Author: spouliot
Date: 2005-12-21 15:23:02 -0500 (Wed, 21 Dec 2005)
New Revision: 54702

Modified:
   trunk/mcs/class/corlib/Test/System.IO/ChangeLog
   trunk/mcs/class/corlib/Test/System.IO/PathTest.cs
Log:
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.



Modified: trunk/mcs/class/corlib/Test/System.IO/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.IO/ChangeLog     2005-12-21 20:18:19 UTC 
(rev 54701)
+++ trunk/mcs/class/corlib/Test/System.IO/ChangeLog     2005-12-21 20:23:02 UTC 
(rev 54702)
@@ -1,3 +1,8 @@
+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.
+
 2005-12-15  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * DirectoryInfoTest.cs: Added test cases for #76191 and #76903.

Modified: trunk/mcs/class/corlib/Test/System.IO/PathTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.IO/PathTest.cs   2005-12-21 20:18:19 UTC 
(rev 54701)
+++ trunk/mcs/class/corlib/Test/System.IO/PathTest.cs   2005-12-21 20:23:02 UTC 
(rev 54702)
@@ -657,6 +657,28 @@
                }
 
                [Test]
+               public void WindowsSystem32_77007 ()
+               {
+                       // 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;
+
+                       string curdir = Directory.GetCurrentDirectory ();
+                       try {
+                               string system = Environment.SystemDirectory;
+                               Directory.SetCurrentDirectory (system);
+                               // e.g. C:dir (no backslash) will return 
CurrentDirectory + dir
+                               string dir = system.Substring (0, 2) + "dir";
+                               AssertEquals ("current dir", Path.Combine 
(system, "dir"), Path.GetFullPath (dir));
+                       }
+                       finally {
+                               Directory.SetCurrentDirectory (curdir);
+                       }
+               }
+
+               [Test]
                public void InvalidPathChars_Values ()
                {
                        char[] invalid = Path.InvalidPathChars;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to