Commit Graph
54 Commits
Author SHA1 Message Date
Alexander Köplinger 48e112d652 [Cleanup] Removed TARGET_JVM
It was once part of a special Java target profile, but this is no longer used today.
2014-08-08 03:28:34 +02:00
Sebastien Pouliot 2a81c70eaa [Test] Change FileTtest.MoveTest to use the temporary directory so it can be executed, without an access denied, on most environment (e.g. an iOS device) 2014-02-18 08:44:28 -05:00
Rodrigo Kumpera 4b0111dac9 [corlib] Add an exhaustive regression test for file sharing and File.Move. 2014-01-08 20:47:01 -05:00
Marek Safar 762b050917 Merge tests from mobile branch 2013-02-26 16:28:36 +01:00
Zoltan Varga bb218f4cde Ignore some corlib tests which fail on linux 2011-10-11 03:49:52 +02:00
Carlos Alberto Cortez d37a747595 2009-12-01 Carlos Alberto Cortez <[email protected]>
* FileTest.cs: New test for File.Copy throwing an exception if src and
	dest are the same.


svn path=/trunk/mcs/; revision=147180
2009-12-01 06:35:39 +00:00
Paolo Molaro 49fa2e3e01 Fixed the tests checking for PlatformID.
svn path=/trunk/mcs/; revision=115657
2008-10-13 14:39:59 +00:00
Dick Porter 6a3949757a 2008-04-22 Dick Porter <[email protected]>
* FileTest.cs: Disable the test for bug 323389, as I've reverted
	the fix.



svn path=/trunk/mcs/; revision=101450
2008-04-22 15:51:56 +00:00
Dick Porter f9428eeb0d 2008-04-17 Dick Porter <[email protected]>
* FileTest.cs: Test for bug 323389.



svn path=/trunk/mcs/; revision=101046
2008-04-17 19:00:05 +00:00
Dick Porter 3b3de5c082 2008-04-17 Dick Porter <[email protected]>
* FileTest.cs: Test for bug 378229.



svn path=/trunk/mcs/; revision=101041
2008-04-17 18:46:09 +00:00
Gert Driesen 5d4e8d2ce4 * DirectoryInfo.cs: Added new internal ctor, which takes a bool that
indicates whether the original path should only container the last
part of the directory. Moved logic for determining the Name and
Parent to Initialize method, to allow it to be re-used on
deserialization. Renamed argument names to fix corcompare issues.
Added missing argument checks.
* Directory.cs (CreateDirectoriesInternal): Use internal ctor for
DirectoryInfo to ensure OriginalPath only contains last part of
the directory.
* File.cs: Removed redundant checks from Create. On 2.0 profile, pass
FileOptions to FileStream. Removed redundant directory check from
Delete and modified exceptions to more closely match MS.
* FileInfo.cs: Added argument check to ctor to match MS. Added missing
deserialization ctor. Modified argument checks in MoveTo, and removed
redundant checks. Added missing argument checks in CopyTo. Code
formatting.
* FileSystemInfo.cs: Modified argument checks in CheckPath to more
closely match MS.
* MonoIO.cs: Added msg that does not disclose filename for
ERROR_FILE_EXISTS.
* Path.cs: Use String.Length instead of comparing with String.Empty.
Removed exceptions argument names to match MS.
* File.cs: Added/improved tests for Create and Move.
* DirectoryInfoTest.cs: No longer derive from deprecated Assertion
class. Improved tests for ctor, Create, Name, Parent, ...
* FileInfoTest.cs: No longer derive from deprecated Assertion class.
Improved/added tests, 
* PathTest.cs: Added tests for IsPathRooted and GetFullPath.
* FileSystemInfoTest.cs: Fixed test. Now passes on both Mono and MS.

svn path=/trunk/mcs/; revision=101006
2008-04-17 15:04:25 +00:00
Gert Driesen 9770502338 * File.cs: Changed argument names and thrown exception to better match
.NET. Use String.Length instead of comparison with empty string.
* DirectoryInfo.cs: Added missing deserialization ctor.
* FileTest.cs: Renamed and improved existing tests. Avoid use of
ExpectedException.
* FileSystemInfoTest.cs: No longer derive from deprecated Assertion
class. Added (de)serialization tests.

svn path=/trunk/mcs/; revision=100870
2008-04-16 14:01:25 +00:00
Dick Porter 7c5b9da5e5 2008-04-04 Dick Porter <[email protected]>
* File.cs: Pretty up the file share exception with the path name.

2008-04-04  Dick Porter  <[email protected]>

	* FileTest.cs: Test moving a file when the access mode disallows
	it.  Test from Eric Albright <[email protected]>, see bug 377049.



svn path=/trunk/mcs/; revision=99860
2008-04-04 17:18:47 +00:00
Zoltan Varga 8f5f9cea86 2008-01-06 Zoltan Varga <[email protected]>
* FileTest.cs: Rename a helper method so it does not begin with Test.

svn path=/trunk/mcs/; revision=92370
2008-01-06 22:25:02 +00:00
Gert Driesen e9357c4348 * FileTest.cs: Added test for File.GetAttributes (and indirectly also
for SetAttributes). Removed use of deprecated Assertion class.

svn path=/trunk/mcs/; revision=84535
2007-08-21 11:26:57 +00:00
Bill Holmes f18043102f 2007-08-20 William Holmes <[email protected]>
Implementing System.IO.File.Replace
	*File.cs:  Add implementation for IO.File.Replace methods.
	*MonoIO.cs: Declared an internal call for ReplaceFile
	*FileTest.cs:  Added a test for IO.File.Replace.  

	Code is contributed under MIT/X11 license.

svn path=/trunk/mcs/; revision=84485
2007-08-20 18:48:55 +00:00
Gert Driesen e80c7764f2 * DirectoryTest.cs: Restore original CurrentCulture on teardown.
* FileSystemInfoTest.cs: Restore original CurrentCulture on teardown.
Removed stray tabs. Code formatting.
* FileTest.cs: Restore original CurrentCulture on teardown. Removed
stray tabs. Changes spaces to tabs.
* ThreadTest.cs: Added tests for bug #81930. 
* CultureInfoTest.cs: Added exception tests when invoking NumberFormat  
or DateTimeFormat on a neutral culture. Added tests for bug #81930.
No longer derive from deprecated Assertion class. Added tests for
GetCultureInfo (2.0).
* ArrayTest.cs: Added test for bug #81941.
* ByteTest.cs: Restore original CurrentCulture in teardown.
* DecimalFormatterTest.cs: Restore original CurrentCulture in teardown.
Code formatting.
* DecimalTest.cs: Code formatting.
* DoubleFormatterTest.cs: Test relies on specific culture, so set it
up here. This worked before since the CurrentCulture was set in another
TestFixture, and the original one was not restored.
* FloatingPointFormatterTest.cs: Same.
* NumberFormatterTest.cs: Same. Removed stray tabs and fixes code
formatting.
* SingleFormatterTest.cs: Restore original culture on teardown. Code
formatting.
* SingleTest.cs: Same.
* StringComparerTest.cs: Restore original culture on teardown.

svn path=/trunk/mcs/; revision=80626
2007-06-24 14:20:09 +00:00
Eyal Alalouf 30c28c41d7 Mark tests as not working under TARGET_JVM
svn path=/trunk/mcs/; revision=74246
2007-03-14 10:47:05 +00:00
Miguel de Icaza 3a23274a17 Revert Patch 72756 until we review and discuss this publicly
svn path=/trunk/mcs/; revision=72768
2007-02-13 13:07:41 +00:00
Boris Kirzner 04052b1827 Path handling fixes in File, Directory and Path including windows-specific negative flows.
svn path=/trunk/mcs/; revision=72756
2007-02-13 12:04:32 +00:00
Boris Kirzner 30eb15be6d Use System.IO tests for TARGET_JVM.
svn path=/trunk/mcs/; revision=71656
2007-01-25 09:48:45 +00:00
Gert Driesen 06a833ea77 * File.cs: In 2.0 profile, File.Get****Time(Utc) should not throw
IOException if specified path does not exist. Fixes bug #77641.
* FileTest.cs: In 2.0 profile, no longer expect IOException when path to
non-existing directory or file is specified in Get***Time(Utc) methods
(bug #77641). Renamed tests and removed trailing tabs. Removed
duplicate test. Fixed GetLastWriteTime(Utc) tests that used
GetLastAccessTime(Utc) instead of GetLastWriteTime(Utc).
* DirectoryTest.cs: No longer expect IOException when path to
non-existing directory or file is specified in Get***Time(Utc) methods
(bug #77641).

svn path=/trunk/mcs/; revision=57338
2006-02-27 17:54:48 +00:00
Ben Maurer c770e5b1a4 In Test/System.IO:
2006-01-12  Ben Maurer  <[email protected]>

	* FileTest.cs: Tests tests for read/writealltext.

In System.IO:
2006-01-12  Ben Maurer  <[email protected]>

	* File.cs: Support for Read/WriteAllText


svn path=/trunk/mcs/; revision=55475
2006-01-13 03:22:19 +00:00
Ben Maurer ad219dbfde 2005-06-10 Ben Maurer <[email protected]>
* FileTest.cs: Fix gonz's typo. Also, clean stuff up by using the
	temp file api, rather than our own hack.


svn path=/trunk/mcs/; revision=45775
2005-06-10 16:37:42 +00:00
Gonzalo Paniagua Javier b500457eeb changed NotWorking for platform checking
svn path=/trunk/mcs/; revision=45458
2005-06-06 01:50:59 +00:00
Gonzalo Paniagua Javier a05d5d288f 2005-06-05 Gonzalo Paniagua Javier <[email protected]>
* FileTest.cs: yet more invalid array accesses removed.


svn path=/trunk/mcs/; revision=45457
2005-06-06 01:48:12 +00:00
Gonzalo Paniagua Javier 9ed86ff6ce now we don't always expect an exception here
svn path=/trunk/mcs/; revision=45456
2005-06-06 01:29:40 +00:00
Gonzalo Paniagua Javier a26cbbe5e0 2005-06-05 Gonzalo Paniagua Javier <[email protected]>
* FileTest.cs: on unix there are no invalid chars and we were trying
	to index beyond the end of the array.


svn path=/trunk/mcs/; revision=45455
2005-06-06 01:21:03 +00:00
Gonzalo Paniagua Javier 04267b5387 2005-06-05 Gonzalo Paniagua Javier <[email protected]>
* FileTest.cs: removed duplicate test. The same thing is done in
	DeleteOpenStream.


svn path=/trunk/mcs/; revision=45454
2005-06-06 01:14:38 +00:00
Ben Maurer 5cbfa93c6e In Test/System.IO:
2005-05-06  Ben Maurer  <[email protected]>

	* FileTest.cs (OpenAppend): Test for #71088.

In System.IO:
2005-05-06  Ben Maurer  <[email protected]>

	* File.cs (Open): If a stream is opened with Append access, you
	only want Write access. Fixes bug #71088.


svn path=/trunk/mcs/; revision=44163
2005-05-06 19:57:29 +00:00
Gonzalo Paniagua Javier 82c2339c3d 2005-02-06 Gonzalo Paniagua Javier <[email protected]>
* Test/System.IO/FileTest.cs: test for invalid characters in file names.
	* System.IO/File.cs: Exists does not throw when there are invalid
	characters in the file name.
	* System.IO/MonoIOError.cs: uncommented INVALID_NAME.


svn path=/trunk/mcs/; revision=40208
2005-02-06 17:10:45 +00:00
Miguel de Icaza 137e01d1e3 2005-01-18 Miguel de Icaza <[email protected]>
* TypeBuilder.cs: Add check for creation.  Fix from Geoff.


More test shuffling to get rid of all the failures from the standard build


svn path=/trunk/mcs/; revision=39074
2005-01-18 05:32:47 +00:00
Miguel de Icaza fcf6291ca9 More Improvements
svn path=/trunk/mcs/; revision=38968
2005-01-14 23:04:09 +00:00
Miguel de Icaza 72e59976ab First pass, many more to go
svn path=/trunk/mcs/; revision=38963
2005-01-14 21:54:26 +00:00
Sebastien Pouliot 93359ce5b4 2004-05-31 Sebastien Pouliot <[email protected]>
* FileTest.cs: Added tests to confirm that Exists never throws
	exceptions even for invalid filenames or for unexisting directories.
	* PathTest.cs: Added windows-specific tests that shows that
	ChangeExtension validate the input patch but doesn't validate the
	resulting path.

svn path=/trunk/mcs/; revision=28599
2004-06-01 00:16:12 +00:00
Jackson Harper 942dcd9a6d * FileTest.cs: We do not need to convert to local time because we
are getting creation time, not utc time.

svn path=/trunk/mcs/; revision=23151
2004-02-16 21:39:43 +00:00
Ville Palo 8782c126a7 2003-06-08 Ville Palo <[email protected]>
* BinaryWriterTest.cs:
	* BinaryReaderTest.cs:
	* DirectoryTest.cs:
	* FileTest.cs: now works with ms.net, clean ups, nunit2, ...

svn path=/trunk/mcs/; revision=15182
2003-06-08 15:59:52 +00:00
Zoltan Varga f1de5fa45c 2003-05-22 Zoltan Varga <[email protected]>
* FileTest.cs: Added tests for moving directories.

svn path=/trunk/mcs/; revision=14794
2003-05-22 11:43:16 +00:00
Nick Drochak aed9b02192 2003/05/20 Nick Drochak <[email protected]>
* FileTest.cs:
	* StreamReaderTest.cs:
	* StreamWriterTest.cs: Workaround for process holding on to directory
	that prevented cleanup and deletion.

svn path=/trunk/mcs/; revision=14715
2003-05-20 05:29:20 +00:00
Ville Palo d0f17062dd 2003-05-13 Ville Palo <[email protected]>
* FileStreamTest.cs:
	* FileTest.cs: Clean up. Now use temp directory. also some nunit2
	changes

svn path=/trunk/mcs/; revision=14549
2003-05-13 19:04:25 +00:00
Ville Palo 4db72d2138 2003-05-06 Ville Palo <[email protected]>
* DirectoryTest: Fixed Utc errors
	* FileTest: Fixes Utc errors. Now these tests works in other
	timezones too.

svn path=/trunk/mcs/; revision=14331
2003-05-06 15:40:26 +00:00
Ville Palo 0578918ed0 2003-04-25 Ville Palo <[email protected]>
* FileTest.cs: more tests..

svn path=/trunk/mcs/; revision=14000
2003-04-25 14:12:05 +00:00
Ville Palo 19142165d3 2003-04-24 Ville Palo <[email protected]>
* FileTest.cs: Fixed tests and added some.

svn path=/trunk/mcs/; revision=13983
2003-04-24 18:28:44 +00:00
Ville Palo d7094817af 2003-04-22 Ville Palo <[email protected]>
* FileTest.cs: More tests.

svn path=/trunk/mcs/; revision=13900
2003-04-22 17:38:40 +00:00
Nick Drochak c835b2ebb3 2003-02-05 Nick Drochak <[email protected]>
* FileTest.cs: Have setup remove files before testing as well in case
	tests were interrupted before TearDown could be called in a previous
	run. Also test for specific exception in TestGetCreationTime ().

svn path=/trunk/mcs/; revision=11209
2003-02-04 15:25:50 +00:00
Zoltan Varga c1cf0c392a 2003-01-28 Zoltan Varga <[email protected]>
* FileTest.cs: Added tests for GetCreationTime.

svn path=/trunk/mcs/; revision=10987
2003-01-28 15:32:17 +00:00
Nick Drochak 99a25b98bd 2002-12-21 Nick Drochak <[email protected]>
* all: make tests build and run under nunit2

svn path=/trunk/mcs/; revision=9817
2002-12-21 14:15:43 +00:00
Gonzalo Paniagua Javier 4c015b6312 2002-09-10 Gonzalo Paniagua Javier <[email protected]>
* FileTest.cs: don't leave AFile.txt open.

svn path=/trunk/mcs/; revision=7352
2002-09-10 14:00:43 +00:00
Nick Drochak 790ca7edd4 2002-05-14 Nick Drochak <[email protected]>
* FileTest.cs: Delete temporary files after each test method; Catch
	unexpected exceptions and report them; Make some Assert messages
	unique; Make sure temp files exist before trying Move and Delete, etc.

svn path=/trunk/mcs/; revision=4619
2002-05-14 10:31:33 +00:00
Mike Gray f13cac4c18 *** empty log message ***
svn path=/trunk/mcs/; revision=4602
2002-05-13 19:07:52 +00:00