Permalink
Browse files

2005-12-21 Sebastien Pouliot <sebastien@ximian.com>

	* PathTest.cs: Added new test case for #77058 where a Windows drive
	wasn't considered during path canonalization.


svn path=/trunk/mcs/; revision=54714
  • Loading branch information...
1 parent 7b2845a commit 0a59f6e40222e17c94cdaee633691dabb1e7509c Sebastien Pouliot committed Dec 22, 2005
Showing with 21 additions and 0 deletions.
  1. +5 −0 mcs/class/corlib/Test/System.IO/ChangeLog
  2. +16 −0 mcs/class/corlib/Test/System.IO/PathTest.cs
@@ -1,3 +1,8 @@
+2005-12-21 Sebastien Pouliot <sebastien@ximian.com>
+
+ * PathTest.cs: Added new test case for #77058 where a Windows drive
+ wasn't considered during path canonalization.
+
2005-12-20 Sebastien Pouliot <sebastien@ximian.com>
* PathTest.cs: Added new test case for #77007 where a Windows drive is
@@ -678,6 +678,22 @@ public void WindowsSystem32_77007 ()
}
}
+ [Test]
+ public void WindowsDriveC14N_77058 ()
+ {
+ // check for Unix platforms - see FAQ for more details
+ // http://www.mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F
+ int platform = (int) Environment.OSVersion.Platform;
+ if ((platform == 4) || (platform == 128))
+ return;
+
+ AssertEquals ("1", @"C:\Windows\dir", Path.GetFullPath (@"C:\Windows\System32\..\dir"));
+ AssertEquals ("2", @"C:\dir", Path.GetFullPath (@"C:\Windows\System32\..\..\dir"));
+ AssertEquals ("3", @"C:\dir", Path.GetFullPath (@"C:\Windows\System32\..\..\..\dir"));
+ AssertEquals ("4", @"C:\dir", Path.GetFullPath (@"C:\Windows\System32\..\..\..\..\dir"));
+ AssertEquals ("5", @"C:\dir\", Path.GetFullPath (@"C:\Windows\System32\..\.\..\.\..\dir\"));
+ }
+
[Test]
public void InvalidPathChars_Values ()
{

0 comments on commit 0a59f6e

Please sign in to comment.