Previously, many tests just had a return statement when the test shouldn't
be executed (e.g. Unix-only). This made it look like the test was successful
when in fact it wasn't executed at all.
Assert.Ignore() is now used instead to correctly exclude those tests.
* FileStream.cs: when running on Windows and a path with Unix
directory separator chars is passed (including an UNC share), get
the canonical form of the path before attempting to retrieve its
directory name. Fixes bug #607502
* Path.cs: typo fix
svn path=/trunk/mcs/; revision=157650
* 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
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-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
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
* Path.cs (GetDirectoryName): The paths returned from this routine
should be canonical, not just a substring. In addition to fixing
this, it also fixes#324742.
svn path=/trunk/mcs/; revision=88708
* Path.cs (GetPathRoot): Return just the \\server\share
part of a UNC. Fixes#78147.
2006-04-28 Robert Jordan <[email protected]>
* PathTest.cs: Added tests for bug #78147.
svn path=/trunk/mcs/; revision=60033
* DirectoryInfoTest.cs: Added test cases for #76191 and #76903.
* PathTest.cs: Added test cases for #76191, the possible modification
of InvalidPathChars and the new 2.0 methods.
svn path=/trunk/mcs/; revision=54457
* DirectoryCas.cs: Added partial trust unit tests.
* DirectoryTest.cs: Added missing [Test] attribute to
SetCreationTimeException1.
* FileStreamCas.cs: New. CAS unit tests for FileStream.
* PathCas.cs: New. CAS unit tests for Path.
* PathTest.cs: Splitted TestGetPathRoot test in two so the second part
could be re-used in partial trust tests.
svn path=/trunk/mcs/; revision=42213
* 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
* System.IO/Path.cs: add the trailing directory separator only for
volumes. Fixes bug #53035.
* Test/System.IO/PathTest.cs: tests for bug 53035 and 52735.
svn path=/trunk/mcs/; revision=22283
* PathTest.cs: Make tests pass on .NET 1.1. Probably still
need to handle different directory and volume separators for
other OS's.
svn path=/trunk/mcs/; revision=21338
* PathTest.cs :
Added more GetPathRoot and GetFullPath tests for windows.
Fixed incorrectly specified arguments in the previous patch.
svn path=/trunk/mcs/; revision=21283