Author: gert
Date: 2007-12-05 04:02:19 -0500 (Wed, 05 Dec 2007)
New Revision: 90734
Modified:
trunk/mcs/class/corlib/Test/System.IO/ChangeLog
trunk/mcs/class/corlib/Test/System.IO/DirectoryTest.cs
Log:
* DirectoryTest.cs: Added (NotWorking) tests for bug #346123.
Modified: trunk/mcs/class/corlib/Test/System.IO/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.IO/ChangeLog 2007-12-05 09:00:12 UTC
(rev 90733)
+++ trunk/mcs/class/corlib/Test/System.IO/ChangeLog 2007-12-05 09:02:19 UTC
(rev 90734)
@@ -1,3 +1,7 @@
+2007-12-05 Gert Driesen <[EMAIL PROTECTED]>
+
+ * DirectoryTest.cs: Added (NotWorking) tests for bug #346123.
+
2007-11-17 Jb Evain <[EMAIL PROTECTED]>
* PathTest.cs: Add test for #341034, GetRandomFileName should
Modified: trunk/mcs/class/corlib/Test/System.IO/DirectoryTest.cs
===================================================================
--- trunk/mcs/class/corlib/Test/System.IO/DirectoryTest.cs 2007-12-05
09:00:12 UTC (rev 90733)
+++ trunk/mcs/class/corlib/Test/System.IO/DirectoryTest.cs 2007-12-05
09:02:19 UTC (rev 90734)
@@ -1458,6 +1458,25 @@
}
}
+ [Test] // bug #346123
+ [Category ("NotWorking")]
+ public void GetDirectories_Backslash ()
+ {
+ if (!RunningOnUnix)
+ // on Windows, backslash is used as directory separator
+ return;
+
+ string dir = Path.Combine (TempFolder, @"sub\dir");
+ Directory.CreateDirectory (dir);
+
+ Assert.IsTrue (Directory.Exists (dir), "#A1");
+ Assert.IsFalse (Directory.Exists (Path.Combine (TempFolder,
"dir")), "#A2");
+
+ string [] dirs = Directory.GetDirectories (TempFolder);
+ Assert.AreEqual (1, dirs.Length, "#B1");
+ Assert.AreEqual (dir, dirs [0], "#B2");
+ }
+
[Test]
public void GetParentOfRootDirectory ()
{
@@ -1491,6 +1510,25 @@
}
}
+ [Test] // bug #346123
+ [Category ("NotWorking")]
+ public void GetFiles_Backslash ()
+ {
+ if (!RunningOnUnix)
+ // on Windows, backslash is used as directory separator
+ return;
+
+ string file = Path.Combine (TempFolder, @"doc\temp1.file");
+ File.Create (file).Close ();
+
+ Assert.IsTrue (File.Exists (file), "#A1");
+ Assert.IsFalse (File.Exists (Path.Combine (TempFolder,
"temp1.file")), "#A2");
+
+ string [] files = Directory.GetFiles (TempFolder);
+ Assert.AreEqual (1, files.Length, "#B1");
+ Assert.AreEqual (file, files [0], "#B2");
+ }
+
[Test] // bug #82212 and bug #325107
public void GetFiles_Pattern ()
{
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches