Commit Graph
62 Commits
Author SHA1 Message Date
Zoltan Varga 03aee949f1 Merge pull request #1200 from akoeplinger/remove-jvm
[Cleanup] Remove TARGET_JVM
2014-08-28 19:17:43 -04:00
João Matos 1bff9d890f Fixed Path.GetFullPath to work correctly when the current path is '/'.
Fixes xambug #833.
2014-08-08 19:03:39 +01:00
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
Alexander Köplinger b0032294da [Test] Cleaned up how a bunch of tests were ignored
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.
2014-02-23 19:44:21 +01:00
Miguel de Icaza 040ba8b7e8 [mscorlib] Path: fix GetFullPath (/../bin/bash) to return /bin/bash, not bin/bash, fixes 17083 2014-02-12 13:19:31 -05:00
Marek Safar 8d56b51656 Fixes build 2014-02-06 18:08:38 +01:00
Marek Safar 5a20d0438a [corlib] Path.Combine with variable arguments length where one is empty should give same result as other Combine overloads 2014-02-05 16:56:03 +01:00
Rodrigo Kumpera abe9dc6206 Revert "Fix object::GetType when remoting is enabled."
This reverts commit 93e2d1dc48.
2013-03-01 10:54:09 -05:00
Rodrigo Kumpera 93e2d1dc48 Fix object::GetType when remoting is enabled. 2013-03-01 10:52:03 -05:00
TalAloni 9a59023366 Added tests to PathTest.cs 2013-03-01 09:04:11 +02:00
Marek Safar afa79435aa Update for mobile profile 2013-02-07 16:34:21 +01:00
Miguel de Icaza 3a5dd7f2df [corlib-tests] If MONO_IOMAP=all, special case the IsPathRooted tests to cope with its semantics 2012-02-24 17:46:30 -05:00
Marek Habersack 7312d09305 2010-05-20 Marek Habersack <[email protected]>
* 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
2010-05-20 21:54:22 +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
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
Miguel de Icaza 8e07acf772 Multiple files:
Deals with the extension to Environment.OSVersion.Platform that might return a new
value MacOSX (6) on .NET
 

svn path=/trunk/mcs/; revision=121711
2008-12-17 17:56:25 +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
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
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
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
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
Miguel de Icaza c97c647b23 2007-11-01 Miguel de Icaza <[email protected]>
* 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
2007-11-02 03:47:10 +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
Boris Kirzner e186082db9 Fix order of InvalidPathChars on windows.
svn path=/trunk/mcs/; revision=73099
2007-02-19 09:25:40 +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 4145bfd988 Test fixes for TARGET_JVM.
svn path=/trunk/mcs/; revision=71890
2007-01-29 15:50:28 +00:00
Atsushi Eno 48a3a32616 2006-04-28 Robert Jordan <[email protected]>
* 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
2006-04-28 12:52:40 +00:00
Sebastien Pouliot 0a59f6e402 2005-12-21 Sebastien Pouliot <[email protected]>
* PathTest.cs: Added new test case for #77058 where a Windows drive
	wasn't considered during path canonalization.


svn path=/trunk/mcs/; revision=54714
2005-12-22 01:55:14 +00:00
Sebastien Pouliot f57c155342 2005-12-20 Sebastien Pouliot <[email protected]>
* PathTest.cs: Added new test case for #77007 where a Windows drive is
	specified with a partial path.


svn path=/trunk/mcs/; revision=54702
2005-12-21 20:23:02 +00:00
Sebastien Pouliot 3eaa34c143 2005-12-15 Sebastien Pouliot <[email protected]>
* 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
2005-12-15 14:29:54 +00:00
Dick Porter 3518c73d6c 2005-11-10 Dick Porter <[email protected]>
* DirectoryInfo.cs: Fix endless recursion problem with root
        directory on windows too.  Fixes bug 76191.



svn path=/trunk/mcs/; revision=52853
2005-11-10 16:22:29 +00:00
Paolo Molaro d76348a9b9 Fix some IsPathRooted tests.
svn path=/trunk/mcs/; revision=43328
2005-04-20 13:38:58 +00:00
Sebastien Pouliot 9cc4dad5a4 2005-03-24 Sebastien Pouliot <[email protected]>
* 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
2005-03-24 14:18:23 +00:00
Sebastien Pouliot da69c6c63c 2004-05-31 Sebastien Pouliot <[email protected]>
* PathTest.cs: Fixed ChangeExtension_BadExtension to run only on Windows.

svn path=/trunk/mcs/; revision=28605
2004-06-01 01:24:57 +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
Atsushi Eno dae65f4674 2003-04-03 Atsushi Enomoto <[email protected]>
* PathTest.cs : Added more patterns on TestChangeExtension().

svn path=/trunk/mcs/; revision=24985
2004-04-02 23:27:27 +00:00
Gonzalo Paniagua Javier 1da8b66667 2004-01-20 Gonzalo Paniagua Javier <[email protected]>
* PathTest.cs: added some unix-only tests for GetFullPath.

svn path=/trunk/mcs/; revision=22292
2004-01-20 08:38:28 +00:00
Gonzalo Paniagua Javier 0af28c3a1b 2004-01-20 Gonzalo Paniagua Javier <[email protected]>
* 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
2004-01-20 05:24:31 +00:00
Gonzalo Paniagua Javier 9d4f8be849 2004-01-20 Gonzalo Paniagua Javier <[email protected]>
* PathTest.cs: a couple of tests for bugs.

svn path=/trunk/mcs/; revision=22281
2004-01-20 04:44:33 +00:00
Atsushi Eno 60fbe6d4f0 2003-12-25 Atsushi Enomoto <[email protected]>
* PathTest.cs : On Unix, "Z:" can be valid local file.
	  And cosmetic character case fix.

svn path=/trunk/mcs/; revision=21488
2003-12-25 08:41:00 +00:00
Nick Drochak 4c0cc7648c 2003-12-19 Nick Drochak <[email protected]>
* 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
2003-12-19 05:25:17 +00:00
Atsushi Eno 94f937d41c 2003-12-17 Atsushi Enomoto <[email protected]>
* PathTest.cs :
	  Added more GetPathRoot and GetFullPath tests for windows.
	  Fixed incorrectly specified arguments in the previous patch.

svn path=/trunk/mcs/; revision=21283
2003-12-17 17:12:25 +00:00
Atsushi Eno 615e45126d 2003-12-17 Atsushi Enomoto <[email protected]>
* PathTests.cs : Added more tests for IsPathRooted, HasExtension
          and GetExtension.

svn path=/trunk/mcs/; revision=21274
2003-12-17 12:54:40 +00:00
Gonzalo Paniagua Javier c6bcb9a2f3 GetTempPath () ends in Path.DirectorySeparatorChar
svn path=/trunk/mcs/; revision=21057
2003-12-12 07:05:31 +00:00
Nick Drochak 85a7b2a87e 2003-05-29 Nick Drochak <[email protected]>
* BinaryReaderTest.cs: fix my oversight
	* BinaryWriterTest.cs: cleanups
	* BufferedStreamTest.cs: cleanups
	* DirectoryInfoTest.cs: cleanups
	* DirectoryTest.cs: cleanups
	* FileStreamTest.cs: cleanups

svn path=/trunk/mcs/; revision=14994
2003-05-29 15:09:51 +00:00
Gonzalo Paniagua Javier 262415c0c6 Ignore test that doesn't work under windows.
svn path=/trunk/mcs/; revision=14603
2003-05-15 13:55:58 +00:00
Gonzalo Paniagua Javier 727b7c4751 2003-05-14 Gonzalo Paniagua Javier <[email protected]>
* PathTest.cs: added test for GetFullPath (".") and ".."

svn path=/trunk/mcs/; revision=14584
2003-05-14 18:27:03 +00:00