Commit Graph
237 Commits
Author SHA1 Message Date
Gonzalo Paniagua Javier 14ae10e4e3 2010-05-27 William Holmes <[email protected]>
* DirectoryTest.cs: Adding test for bug 580090.

	Code is contributed under MIT/X11 license.

svn path=/trunk/mcs/; revision=159859
2010-07-04 16:39:26 +00:00
Marek Habersack 5aa256010e 2010-05-08 Marek Habersack <[email protected]>
* Path.cs: vararg overload of Combine now correctly concatenates
	segments.
	The 3 and 4 argument overloads of Combine check whether the passed
	segments are null or not.

2010-05-08  Marek Habersack  <[email protected]>

	* PathTest.cs: added tests for the 4.0 Combine overloads.

svn path=/trunk/mcs/; revision=156928
2010-05-07 23:00:28 +00:00
Gonzalo Paniagua Javier d341faf689 2010-03-17 Gonzalo Paniagua Javier <[email protected]>
* StreamReaderTest.cs: test for bug 589236. The detected encoding is
	different from the one provided in the ctor.


svn path=/trunk/mcs/; revision=153802
2010-03-18 02:56:09 +00:00
Carlos Alberto Cortez 60b099f810 2010-02-22 Carlos Alberto Cortez <[email protected]>
* MemoryStreamTest.cs: Add a new test for Capacity.


svn path=/trunk/mcs/; revision=152221
2010-02-22 22:26:42 +00:00
Carlos Alberto Cortez 0a32a75f14 2010-01-23 Carlos Alberto Cortez <[email protected]>
* StreamReaderTest.cs: New test for encoding detection.


svn path=/trunk/mcs/; revision=150091
2010-01-24 04:07:46 +00:00
Carlos Alberto Cortez 30332f667b 2010-01-03 Carlos Alberto Cortez <[email protected]>
* MemoryStreamTest.cs: Activate ZeroingOnExpandTest as we have fixed
	this issue.


svn path=/trunk/mcs/; revision=148996
2010-01-04 03:46:42 +00: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
Sebastien Pouliot 47f90fc316 In Test/System.IO:
2009-10-15  Sebastien Pouliot  <[email protected]>

	* UnmanagedMemoryStreamTest.cs: Add more test cases to cover all
	validations

In System.IO:
2009-10-15  Sebastien Pouliot  <[email protected]>

	* UnmanagedMemoryStream.cs: Fix some and add missing validations


svn path=/trunk/mcs/; revision=144226
2009-10-15 20:18:40 +00:00
Robert Jordan 3b80e25382 2009-06-25 Robert Jordan <[email protected]>
* BinaryReaderTest.cs, BinaryWriterTest.cs, BufferedStreamTest.cs,
	PathTest.cs, PathTest.cs, StringWriterTest.cs, TextWriterTest.cs:
	Upgrade to new NUnit style.


svn path=/trunk/mcs/; revision=136815
2009-06-25 11:02:07 +00:00
Raja R Harinath 5201a990a2 * FileInfoTest.cs: Wrap Replace() tests in #if NET_2_0.
svn path=/trunk/mcs/; revision=133655
2009-05-06 13:35:46 +00:00
Sebastien Pouliot 00a9a5e7ca 2009-04-27 Sebastien Pouliot <[email protected]>
* StreamReaderTest.cs: Fix build for NET_1_1


svn path=/trunk/mcs/; revision=132787
2009-04-27 21:12:30 +00:00
Miguel de Icaza 8b1742d19b Reapply
svn path=/trunk/mcs/; revision=132666
2009-04-25 18:59:23 +00:00
Miguel de Icaza c2545dcc09 Revert 132601, 132602 as it made the csharp console stop working
svn path=/trunk/mcs/; revision=132638
2009-04-24 23:43:12 +00:00
Gonzalo Paniagua Javier 4cc36d1481 2009-04-24 Gonzalo Paniagua Javier <[email protected]>
* StreamReaderTest.cs: new test. Using Peek() when we did a short read
	should block if needed.


svn path=/trunk/mcs/; revision=132602
2009-04-24 16:46:27 +00:00
Marek Habersack fe15b22c9e Revert r130049
svn path=/trunk/mcs/; revision=130110
2009-03-24 08:48:23 +00:00
Marek Habersack 82bbdb387b 2009-03-23 Marek Habersack <[email protected]>
* ConsoleTest.cs: added a bunch of tests for the standard input,
	output and error stream properties.

2009-03-23  Marek Habersack  <[email protected]>

	* FileStreamTest.cs: added a bunch of tests for SafeFileHandle
	constructors

2009-03-23  Marek Habersack  <[email protected]>

	* Console.cs: OpenStandard{Input,Output,Error} no longer use
	FileStream on 2.0+. The reason is that SafeFileHandle used in the
	stream doesn't allow handles with values <= 0, and on Unix stdin
	is 0 which would break the Console class. Instead of FileStream,
	introduced a simple internal specialized stream which is used in
	this scenario.

2009-03-23  Marek Habersack  <[email protected]>

	* FileStream.cs: implemented full support for SafeFileHandle in
	2.0. The obsolete constructors taking an IntPtr now wrap it in a
	SafeFileHandle.

2009-03-23  Marek Habersack  <[email protected]>

	* SafeHandle.cs: added an internal property, OwnsHandle, used by
	FileStream.

svn path=/trunk/mcs/; revision=130049
2009-03-23 12:57:04 +00:00
Gonzalo Paniagua Javier 2b6f0ebd4a 2009-02-24 Gonzalo Paniagua Javier <[email protected]>
* StringReaderTest.cs: new test for ReadLine.


svn path=/trunk/mcs/; revision=127915
2009-02-24 23:49:51 +00:00
Atsushi Eno 7a7f3b5b1b 2008-12-10 Atsushi Enomoto <[email protected]>
* BinaryReaderTest.cs : fix tests that are also failing under .NET
	  (Exposed by nunit24).


svn path=/trunk/mcs/; revision=121179
2008-12-10 00:53:33 +00:00
Bill Holmes 779f43ff6d 2008-11-09 William Holmes <[email protected]>
* corlib_test.dll.sources: Add TextReaderTest.cs.

	* TextReaderTest.cs: Added a test for the Null field of
         the TextReader.

	* TextReader.cs : Adding the NullTextReader as a private class to
	  the TestReader class for the Null field of the TestReader.

	Code is contributed under MIT/X11 license.


svn path=/trunk/mcs/; revision=118315
2008-11-09 15:10:46 +00:00
Gonzalo Paniagua Javier 90153954a1 2008-10-29 Gonzalo Paniagua Javier <[email protected]>
* PathTest.cs: add test for bug #439751.


svn path=/trunk/mcs/; revision=117436
2008-10-29 22:20:27 +00:00
Zoltan Varga ed60685813 2008-10-12 Zoltan Varga <[email protected]>
* BinaryReaderTest.cs: Add a test for #434581.

svn path=/trunk/mcs/; revision=115561
2008-10-12 10:46:05 +00:00
Gert Driesen 77d2788360 * StreamWriterTest.cs: Removed Constructor2_Path_Whitespace test, as
it only applies to Windows (and is duplicate for illegal chars test).
Only check paramname for buffersize exception on 2.0 profile.

svn path=/trunk/mcs/; revision=110638
2008-08-16 09:37:01 +00:00
Gert Driesen 8d3024b086 * StreamWriter.cs: Change argument check for buffersize to require
positive number. Removed duplicate disposed check for AutoFlush.
Removed unnecessary initialization of bools.
* StreamWriterTest.cs: Added more .ctor tests. Enabled AutoFlush
test.

svn path=/trunk/mcs/; revision=110626
2008-08-15 22:00:24 +00:00
Gert Driesen 5daa245e52 * StreamWriter.cs: Removed duplicate argument checks from .ctor taking
path, as these checks are already done in FileStream .ctor. Removed
parameter name from ArgumentException to match MS.
* StreamWriterTest.cs: Moved ctor argument checks to separate methods.
Added and improved ctor tests. Added test for Close. Improved
(Auto)Flush tests. Use Assert class instead of Assertion.

svn path=/trunk/mcs/; revision=110610
2008-08-15 21:18:10 +00:00
Gert Driesen a9d44f8ddf * Path.cs: Fixed exception arguments to match MS. Removed obsolete
LAMESPEC comment. In GetPathRoot, throw ArgumentException if path
is whitespace-only. Throw ArgumentException in HasExtension, if path
contains invalid path characters.
* PathCas.cs: Updated method names to reflect changes in PathTest.
* PathTest.cs: Renamed tests. Use String.Empty instead of "". Added
argument check tests, and moved tests to separate methods. Avoid using 
ExpectedException.

svn path=/trunk/mcs/; revision=106353
2008-06-21 15:09:21 +00:00
Robert Jordan 28007d2993 In System.IO:
2008-05-29  Robert Jordan  <[email protected]>

	* Path.cs (InsecureGetFullPath): Call CanonicalizePath for
	UNC paths as well.
	* Path.cs (GetServerAndShare): New helper method.
	* Path.cs (SameRoot, CanonicalizePath): Add UNC support.
	Fixes #394681 and a bunch of TestGetFullPath unit cases.
	All changes are Win32 related.

In Test/System.IO:
2008-05-29  Robert Jordan  <[email protected]>

	* PathTest.cs (TestGetFullPathUnix, TestGetFullPathWindows):
	Factored out from the disabled TestGetFullPath test while fixing
	the issues mentioned by the ERROR comment and bug #394681.


svn path=/trunk/mcs/; revision=106188
2008-06-19 08:30:45 +00:00
Dick Porter abc5a12121 2008-05-08 Dick Porter <[email protected]>
* Makefile: Test/System.IO/DirectoryInfoTest.cs needs Mono.Posix

2008-05-08  Dick Porter  <[email protected]>

	* DirectoryInfoTest.cs: Added a test for bug 385765.



svn path=/trunk/mcs/; revision=102819
2008-05-08 16:42:50 +00:00
Gert Driesen 4408538090 * DirectoryTest.cs: Do not use ExpectedException to avoid false
positives. Use String.Empty instead of "".

svn path=/trunk/mcs/; revision=102200
2008-04-30 13:13:33 +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
Dick Porter 252f7210fb 2008-04-03 Dick Porter <[email protected]>
* DirectoryTest.cs: Enable tests now that bug 346123 is fixed.



svn path=/trunk/mcs/; revision=99753
2008-04-03 15:26:53 +00:00
Sebastien Pouliot 41849547b1 2008-03-28 Sebastien Pouliot <[email protected]>
* DirectoryTest.cs: Add test case when deleting a directory that does
	not exists but where a file of the same name exists.


svn path=/trunk/mcs/; revision=99232
2008-03-28 19:11:25 +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
Zoltan Varga 187eeac7b4 2007-12-28 Zoltan Varga <[email protected]>
* MemoryStreamTest.cs: Add new test.

svn path=/trunk/mcs/; revision=91972
2007-12-28 00:40:31 +00:00
Gert Driesen 1098b12fcd * DirectoryTest.cs: Added (NotWorking) tests for bug #346123.
svn path=/trunk/mcs/; revision=90734
2007-12-05 09:02:19 +00:00
Jb Evain f57a5e7174 2007-11-17 Jb Evain <[email protected]>
* PathTest.cs: Add test for #341034, GetRandomFileName should
	return only file names in [a..z0..9].


svn path=/trunk/mcs/; revision=89873
2007-11-17 20:03:47 +00:00
Sebastien Pouliot f6daeaa5d8 2007-11-05 Sebastien Pouliot <[email protected]>
* MemoryStreamTest.cs: Add test case for #322672 (which seems already
	fixed in SVN).


svn path=/trunk/mcs/; revision=88897
2007-11-05 18:27:15 +00:00
Atsushi Eno 0c13358500 2007-11-02 Atsushi Enomoto <[email protected]>
* PathTest.cs: Fixed wrong assumption on GetDirectoryName("/")
	  result on Unix (on top level it returns null).


svn path=/trunk/mcs/; revision=88736
2007-11-02 17:46:05 +00:00
Robert Jordan 0783c77051 2007-11-02 Robert Jordan <[email protected]>
* PathTest.cs (TestGetDirectoryName): Fix syntax errors.


svn path=/trunk/mcs/; revision=88718
2007-11-02 12:51:45 +00:00
Gert Driesen 9ac9ec085f * DirectoryTest.cs: Added RunningOnUnix property to use for enabling
or disabling tests on a specific platform. Enabled and improved test
for bug #325107.

svn path=/trunk/mcs/; revision=86537
2007-09-27 20:44:41 +00:00
Gert Driesen 1b42ccf81b * MemoryStreamTest.cs: Added test for bug #327053.
svn path=/trunk/mcs/; revision=86146
2007-09-21 13:04:49 +00:00
Gert Driesen 6f78e93355 * DirectoryTest.cs: Added test for bug #82440.
svn path=/trunk/mcs/; revision=85513
2007-09-08 08:28: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
Dick Porter 3763b7e301 2007-08-01 Dick Porter <[email protected]>
* DirectoryTest.cs: Test for bug 82212 is now working.



svn path=/trunk/mcs/; revision=83192
2007-08-01 14:00:25 +00:00
Gert Driesen 89ce0512ba * DirectoryTest.cs: Added test for bug #82212.
svn path=/trunk/mcs/; revision=82907
2007-07-28 06:50:40 +00:00