public class DirectoryTest : Assertion {\r
\r
string TempFolder = Path.Combine (Path.GetTempPath (), "MonoTests.System.IO.Tests");\r
- \r
+ static readonly char DSC = Path.DirectorySeparatorChar;\r
+\r
[SetUp]\r
public void SetUp ()\r
{\r
[Test]\r
public void CreateDirectory ()\r
{\r
- string path = TempFolder + "/DirectoryTest.Test.1";\r
+ string path = TempFolder + DSC + "DirectoryTest.Test.1";\r
DeleteDirectory (path);\r
try {\r
DirectoryInfo info = Directory.CreateDirectory (path);\r
[ExpectedException(typeof(ArgumentException))]\r
public void CreateDirectoryArgumentException3 ()\r
{\r
- string path = TempFolder + "/DirectoryTest.Test";\r
+ string path = TempFolder + DSC + "DirectoryTest.Test";\r
DeleteDirectory (path);\r
try {\r
path += Path.InvalidPathChars [0];\r
[Test]\r
public void Delete ()\r
{\r
- string path = TempFolder + "/DirectoryTest.Test.Delete.1";\r
+ string path = TempFolder + DSC + "DirectoryTest.Test.Delete.1";\r
DeleteDirectory (path);\r
try {\r
Directory.CreateDirectory (path);\r
AssertEquals ("test#01", true, Directory.Exists (path));\r
\r
- Directory.CreateDirectory (path + "/DirectoryTest.Test.Delete.1.2");\r
- AssertEquals ("test#02", true, Directory.Exists (path + "/DirectoryTest.Test.Delete.1.2"));\r
+ Directory.CreateDirectory (path + DSC + "DirectoryTest.Test.Delete.1.2");\r
+ AssertEquals ("test#02", true, Directory.Exists (path + DSC + "DirectoryTest.Test.Delete.1.2"));\r
\r
- Directory.Delete (path + "/DirectoryTest.Test.Delete.1.2");\r
- AssertEquals ("test#03", false, Directory.Exists (path + "/DirectoryTest.Test.Delete.1.2"));\r
+ Directory.Delete (path + DSC + "DirectoryTest.Test.Delete.1.2");\r
+ AssertEquals ("test#03", false, Directory.Exists (path + DSC + "DirectoryTest.Test.Delete.1.2"));\r
AssertEquals ("test#04", true, Directory.Exists (path));\r
\r
Directory.Delete (path);\r
- AssertEquals ("test#05", false, Directory.Exists (path + "/DirectoryTest.Test.Delete.1.2"));\r
+ AssertEquals ("test#05", false, Directory.Exists (path + DSC + "DirectoryTest.Test.Delete.1.2"));\r
AssertEquals ("test#06", false, Directory.Exists (path)); \r
\r
Directory.CreateDirectory (path);\r
- Directory.CreateDirectory (path + "/DirectoryTest.Test.Delete.1.2");\r
- AssertEquals ("test#07", true, Directory.Exists (path + "/DirectoryTest.Test.Delete.1.2"));\r
+ Directory.CreateDirectory (path + DSC + "DirectoryTest.Test.Delete.1.2");\r
+ AssertEquals ("test#07", true, Directory.Exists (path + DSC + "DirectoryTest.Test.Delete.1.2"));\r
AssertEquals ("test#08", true, Directory.Exists (path));\r
\r
Directory.Delete (path, true);\r
- AssertEquals ("test#09", false, Directory.Exists (path + "/DirectoryTest.Test.Delete.1.2"));\r
+ AssertEquals ("test#09", false, Directory.Exists (path + DSC + "DirectoryTest.Test.Delete.1.2"));\r
AssertEquals ("test#10", false, Directory.Exists (path));\r
} finally {\r
DeleteDirectory (path);\r
[ExpectedException(typeof(ArgumentException))]\r
public void DeleteArgumentException3 ()\r
{\r
- string path = TempFolder + "/DirectoryTest.Test.4";\r
+ string path = TempFolder + DSC + "DirectoryTest.Test.4";\r
DeleteDirectory (path);\r
\r
path += Path.InvalidPathChars [0];\r
[ExpectedException(typeof(DirectoryNotFoundException))]\r
public void DeleteDirectoryNotFoundException ()\r
{\r
- string path = TempFolder + "/DirectoryTest.Test.5";\r
+ string path = TempFolder + DSC + "DirectoryTest.Test.5";\r
DeleteDirectory (path);\r
\r
Directory.Delete (path); \r
[ExpectedException(typeof(IOException))]\r
public void DeleteArgumentException4 ()\r
{\r
- string path = TempFolder + "/DirectoryTest.Test.6";\r
+ string path = TempFolder + DSC + "DirectoryTest.Test.6";\r
DeleteDirectory (path);\r
FileStream s = null;\r
Directory.CreateDirectory (path);\r
try {\r
- s = File.Create (path + "/DirectoryTest.Test.6");\r
+ s = File.Create (path + DSC + "DirectoryTest.Test.6");\r
Directory.Delete (path);\r
} finally {\r
if (s != null)\r
}\r
\r
[Test]\r
+#if !NET_2_0\r
[ExpectedException(typeof(IOException))]\r
- public void GetCreationTimeException3 ()\r
+#endif\r
+ public void GetCreationTimeException_NonExistingPath ()\r
{\r
- string path = TempFolder + "/DirectoryTest.GetCreationTime.1";\r
+ string path = TempFolder + DSC + "DirectoryTest.GetCreationTime.1";\r
DeleteDirectory (path);\r
try {\r
- Directory.GetCreationTime (path);\r
+ DateTime time = Directory.GetCreationTime (path);\r
+\r
+#if NET_2_0\r
+ DateTime expectedTime = (new DateTime (1601, 1, 1)).ToLocalTime ();\r
+ Assertion.AssertEquals ("#1", expectedTime.Year, time.Year);\r
+ Assertion.AssertEquals ("#2", expectedTime.Month, time.Month);\r
+ Assertion.AssertEquals ("#3", expectedTime.Day, time.Day);\r
+ Assertion.AssertEquals ("#4", expectedTime.Hour, time.Hour);\r
+ Assertion.AssertEquals ("#5", expectedTime.Second, time.Second);\r
+ Assertion.AssertEquals ("#6", expectedTime.Millisecond, time.Millisecond);\r
+#endif\r
} finally {\r
DeleteDirectory (path);\r
}\r
}\r
\r
[Test]\r
- [ExpectedException(typeof(IOException))]\r
- public void GetCreationTimeUtcException3 ()\r
+#if !NET_2_0\r
+ [ExpectedException (typeof (IOException))]\r
+#endif\r
+ public void GetCreationTimeUtc_NonExistingPath ()\r
{\r
- string path = TempFolder + "/DirectoryTest.GetCreationTimeUtc.1";\r
+ string path = TempFolder + DSC + "DirectoryTest.GetCreationTimeUtc.1";\r
DeleteDirectory (path);\r
\r
try {\r
- Directory.GetCreationTimeUtc (path);\r
+ DateTime time = Directory.GetCreationTimeUtc (path);\r
+\r
+#if NET_2_0\r
+ Assertion.AssertEquals ("#1", 1601, time.Year);\r
+ Assertion.AssertEquals ("#2", 1, time.Month);\r
+ Assertion.AssertEquals ("#3", 1, time.Day);\r
+ Assertion.AssertEquals ("#4", 0, time.Hour);\r
+ Assertion.AssertEquals ("#5", 0, time.Second);\r
+ Assertion.AssertEquals ("#6", 0, time.Millisecond);\r
+#endif\r
} finally {\r
DeleteDirectory (path);\r
}\r
}\r
\r
[Test]\r
- [ExpectedException(typeof(IOException))]\r
- public void GetLastAccessTimeException3 ()\r
+#if !NET_2_0\r
+ [ExpectedException (typeof (IOException))]\r
+#endif\r
+ public void GetLastAccessTime_NonExistingPath ()\r
{\r
- string path = TempFolder + "/DirectoryTest.GetLastAccessTime.1";\r
+ string path = TempFolder + DSC + "DirectoryTest.GetLastAccessTime.1";\r
DeleteDirectory (path);\r
\r
try {\r
- Directory.GetLastAccessTime (path);\r
+ DateTime time = Directory.GetLastAccessTime (path);\r
+\r
+#if NET_2_0\r
+ DateTime expectedTime = (new DateTime (1601, 1, 1)).ToLocalTime ();\r
+ Assertion.AssertEquals ("#1", expectedTime.Year, time.Year);\r
+ Assertion.AssertEquals ("#2", expectedTime.Month, time.Month);\r
+ Assertion.AssertEquals ("#3", expectedTime.Day, time.Day);\r
+ Assertion.AssertEquals ("#4", expectedTime.Hour, time.Hour);\r
+ Assertion.AssertEquals ("#5", expectedTime.Second, time.Second);\r
+ Assertion.AssertEquals ("#6", expectedTime.Millisecond, time.Millisecond);\r
+#endif\r
} finally {\r
DeleteDirectory (path);\r
}\r
}\r
\r
[Test]\r
- [ExpectedException(typeof(IOException))]\r
- public void GetLastAccessTimeUtcException3 ()\r
+#if !NET_2_0\r
+ [ExpectedException (typeof (IOException))]\r
+#endif\r
+ public void GetLastAccessTimeUtc_NonExistingPath ()\r
{\r
- string path = TempFolder + "/DirectoryTest.GetLastAccessTimeUtc.1";\r
+ string path = TempFolder + DSC + "DirectoryTest.GetLastAccessTimeUtc.1";\r
DeleteDirectory (path);\r
try {\r
- Directory.GetLastAccessTimeUtc (path);\r
+ DateTime time = Directory.GetLastAccessTimeUtc (path);\r
+\r
+#if NET_2_0\r
+ Assertion.AssertEquals ("#1", 1601, time.Year);\r
+ Assertion.AssertEquals ("#2", 1, time.Month);\r
+ Assertion.AssertEquals ("#3", 1, time.Day);\r
+ Assertion.AssertEquals ("#4", 0, time.Hour);\r
+ Assertion.AssertEquals ("#5", 0, time.Second);\r
+ Assertion.AssertEquals ("#6", 0, time.Millisecond);\r
+#endif\r
} finally {\r
DeleteDirectory (path);\r
}\r
}\r
\r
[Test]\r
- [ExpectedException(typeof(IOException))]\r
- public void GetLastWriteTimeException3 ()\r
+#if !NET_2_0\r
+ [ExpectedException (typeof (IOException))]\r
+#endif\r
+ public void GetLastWriteTime_NonExistingPath ()\r
{\r
- string path = TempFolder + "/DirectoryTest.GetLastWriteTime.1";\r
+ string path = TempFolder + DSC + "DirectoryTest.GetLastWriteTime.1";\r
DeleteDirectory (path);\r
try {\r
- Directory.GetLastWriteTime (path);\r
+ DateTime time = Directory.GetLastWriteTime (path);\r
+\r
+#if NET_2_0\r
+ DateTime expectedTime = (new DateTime (1601, 1, 1)).ToLocalTime ();\r
+ Assertion.AssertEquals ("#1", expectedTime.Year, time.Year);\r
+ Assertion.AssertEquals ("#2", expectedTime.Month, time.Month);\r
+ Assertion.AssertEquals ("#3", expectedTime.Day, time.Day);\r
+ Assertion.AssertEquals ("#4", expectedTime.Hour, time.Hour);\r
+ Assertion.AssertEquals ("#5", expectedTime.Second, time.Second);\r
+ Assertion.AssertEquals ("#6", expectedTime.Millisecond, time.Millisecond);\r
+#endif\r
} finally {\r
DeleteDirectory (path);\r
}\r
[ExpectedException(typeof(ArgumentException))] \r
public void GetLastWriteTimeUtcException2 ()\r
{\r
- Directory.GetLastAccessTimeUtc ("");\r
+ Directory.GetLastWriteTimeUtc ("");\r
}\r
\r
[Test]\r
- [ExpectedException(typeof(IOException))]\r
- public void GetLastWriteTimeUtcException3 ()\r
+#if !NET_2_0\r
+ [ExpectedException (typeof (IOException))]\r
+#endif\r
+ public void GetLastWriteTimeUtc_NonExistingPath ()\r
{\r
- string path = TempFolder + "/DirectoryTest.GetLastWriteTimeUtc.1";\r
+ string path = TempFolder + DSC + "DirectoryTest.GetLastWriteTimeUtc.1";\r
DeleteDirectory (path);\r
try {\r
- Directory.GetLastAccessTimeUtc (path);\r
+ DateTime time = Directory.GetLastWriteTimeUtc (path);\r
+\r
+#if NET_2_0\r
+ Assertion.AssertEquals ("#1", 1601, time.Year);\r
+ Assertion.AssertEquals ("#2", 1, time.Month);\r
+ Assertion.AssertEquals ("#3", 1, time.Day);\r
+ Assertion.AssertEquals ("#4", 0, time.Hour);\r
+ Assertion.AssertEquals ("#5", 0, time.Second);\r
+ Assertion.AssertEquals ("#6", 0, time.Millisecond);\r
+#endif\r
} finally {\r
DeleteDirectory (path);\r
}\r
[ExpectedException(typeof(ArgumentException))] \r
public void GetLastWriteTimeUtcException4 ()\r
{\r
- Directory.GetLastAccessTimeUtc (" ");\r
+ Directory.GetLastWriteTimeUtc (" ");\r
}\r
\r
[Test]\r
[ExpectedException(typeof(ArgumentException))] \r
public void GetLastWriteTimeUtcException5 ()\r
{\r
- Directory.GetLastAccessTimeUtc (Path.InvalidPathChars [0].ToString ());\r
+ Directory.GetLastWriteTimeUtc (Path.InvalidPathChars[0].ToString ());\r
}\r
\r
[Test]\r
public void Move ()\r
{\r
- string path = TempFolder + "/DirectoryTest.Test.9";\r
- string path2 = TempFolder + "/DirectoryTest.Test.10";\r
+ string path = TempFolder + DSC + "DirectoryTest.Test.9";\r
+ string path2 = TempFolder + DSC + "DirectoryTest.Test.10";\r
DeleteDirectory (path);\r
DeleteDirectory (path2);\r
try {\r
Directory.CreateDirectory (path);\r
- Directory.CreateDirectory (path + "/" + "dir");\r
- AssertEquals ("test#01", true, Directory.Exists (path + "/" + "dir"));\r
+ Directory.CreateDirectory (path + DSC + "dir");\r
+ AssertEquals ("test#01", true, Directory.Exists (path + DSC + "dir"));\r
\r
Directory.Move (path, path2);\r
- AssertEquals ("test#02", false, Directory.Exists (path + "/" + "dir")); \r
- AssertEquals ("test#03", true, Directory.Exists (path2 + "/" + "dir"));\r
+ AssertEquals ("test#02", false, Directory.Exists (path + DSC + "dir")); \r
+ AssertEquals ("test#03", true, Directory.Exists (path2 + DSC + "dir"));\r
\r
} finally {\r
DeleteDirectory (path);\r
DeleteDirectory (path2);\r
- if (Directory.Exists (path2 + "/" + "dir"))\r
- Directory.Delete (path2 + "/" + "dir", true); \r
+ if (Directory.Exists (path2 + DSC + "dir"))\r
+ Directory.Delete (path2 + DSC + "dir", true); \r
}\r
}\r
\r
[ExpectedException(typeof(IOException))]\r
public void MoveException1 ()\r
{\r
- string path = TempFolder + "/DirectoryTest.Test.8";\r
+ string path = TempFolder + DSC + "DirectoryTest.Test.8";\r
DeleteDirectory (path); \r
try {\r
Directory.Move (path, path); \r
[ExpectedException(typeof(ArgumentException))]\r
public void MoveException2 ()\r
{\r
- string path = TempFolder + "/DirectoryTest.Test.11";\r
+ string path = TempFolder + DSC + "DirectoryTest.Test.11";\r
DeleteDirectory (path); \r
try {\r
Directory.Move ("", path); \r
[ExpectedException(typeof(ArgumentException))]\r
public void MoveException3 ()\r
{\r
- string path = TempFolder + "/DirectoryTest.Test.12";\r
+ string path = TempFolder + DSC + "DirectoryTest.Test.12";\r
DeleteDirectory (path); \r
try {\r
Directory.Move (" ", path);\r
[ExpectedException(typeof(ArgumentException))]\r
public void MoveException4 ()\r
{\r
- string path = TempFolder + "/DirectoryTest.Test.13";\r
+ string path = TempFolder + DSC + "DirectoryTest.Test.13";\r
path += Path.InvalidPathChars [0];\r
- string path2 = TempFolder + "/DirectoryTest.Test.13"; \r
+ string path2 = TempFolder + DSC + "DirectoryTest.Test.13"; \r
DeleteDirectory (path);\r
DeleteDirectory (path2);\r
try {\r
[ExpectedException(typeof(DirectoryNotFoundException))]\r
public void MoveException5 ()\r
{\r
- string path = TempFolder + "/DirectoryTest.Test.14";\r
+ string path = TempFolder + DSC + "DirectoryTest.Test.14";\r
DeleteDirectory (path);\r
try {\r
Directory.Move (path, path + "Test.Test"); \r
[ExpectedException(typeof(IOException))]\r
public void MoveException6 ()\r
{\r
- string path = TempFolder + "/DirectoryTest.Test.15";\r
+ string path = TempFolder + DSC + "DirectoryTest.Test.15";\r
DeleteDirectory (path);\r
try {\r
Directory.CreateDirectory (path); \r
- Directory.Move (path, path + "/" + "dir");\r
+ Directory.Move (path, path + DSC + "dir");\r
} finally {\r
DeleteDirectory (path);\r
- DeleteDirectory (path + "/" + "dir"); \r
+ DeleteDirectory (path + DSC + "dir"); \r
}\r
}\r
\r
[ExpectedException(typeof(IOException))]\r
public void MoveException7 ()\r
{\r
- string path = TempFolder + "/DirectoryTest.Test.16";\r
- string path2 = TempFolder + "/DirectoryTest.Test.17";\r
+ string path = TempFolder + DSC + "DirectoryTest.Test.16";\r
+ string path2 = TempFolder + DSC + "DirectoryTest.Test.17";\r
\r
DeleteDirectory (path);\r
DeleteDirectory (path2); \r
}\r
\r
[Test]\r
+ [Ignore("Unix doesnt support CreationTime")]\r
public void CreationTime ()\r
{\r
- string path = TempFolder + "/DirectoryTest.CreationTime.1";\r
+ string path = TempFolder + DSC + "DirectoryTest.CreationTime.1";\r
DeleteDirectory (path);\r
\r
try {\r
[Test]\r
public void LastAccessTime ()\r
{\r
- string path = TempFolder + "/DirectoryTest.AccessTime.1";\r
+ string path = TempFolder + DSC + "DirectoryTest.AccessTime.1";\r
DeleteDirectory (path);\r
\r
try {\r
[Test]\r
public void LastWriteTime ()\r
{\r
- string path = TempFolder + "/DirectoryTest.WriteTime.1";\r
+ string path = TempFolder + DSC + "DirectoryTest.WriteTime.1";\r
DeleteDirectory (path); \r
\r
try {\r
public void SetLastWriteTimeException3 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2); \r
- string path = TempFolder + "/DirectoryTest.SetLastWriteTime.2";\r
+ string path = TempFolder + DSC + "DirectoryTest.SetLastWriteTime.2";\r
DeleteDirectory (path);\r
try {\r
Directory.SetLastWriteTime (path, time);\r
public void SetLastWriteTimeUtcException3 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2); \r
- string path = TempFolder + "/DirectoryTest.SetLastWriteTimeUtc.2";\r
+ string path = TempFolder + DSC + "DirectoryTest.SetLastWriteTimeUtc.2";\r
DeleteDirectory (path);\r
try {\r
Directory.SetLastWriteTimeUtc (path, time);\r
// public void SetLastWriteTimeUtcException6 ()\r
// {\r
// DateTime time = new DateTime (1000, 4, 6, 6, 4, 2);\r
-// string path = TempFolder + "/DirectoryTest.SetLastWriteTimeUtc.1";\r
+// string path = TempFolder + DSC + "DirectoryTest.SetLastWriteTimeUtc.1";\r
//\r
// if (!Directory.Exists (path))\r
// Directory.CreateDirectory (path);\r
public void SetLastAccessTimeException3 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2); \r
- string path = TempFolder + "/DirectoryTest.SetLastAccessTime.2";\r
+ string path = TempFolder + DSC + "DirectoryTest.SetLastAccessTime.2";\r
DeleteDirectory (path);\r
try {\r
Directory.SetLastAccessTime (path, time);\r
// public void SetLastAccessTimeException6 ()\r
// {\r
// DateTime time = new DateTime (1003, 4, 6, 6, 4, 2);\r
-// string path = TempFolder + "/DirectoryTest.SetLastAccessTime.1";\r
+// string path = TempFolder + DSC + "DirectoryTest.SetLastAccessTime.1";\r
//\r
// if (!Directory.Exists (path)) \r
// Directory.CreateDirectory (path);\r
public void SetLastAccessTimeUtcException3 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2); \r
- string path = TempFolder + "/DirectoryTest.SetLastAccessTimeUtc.2";\r
+ string path = TempFolder + DSC + "DirectoryTest.SetLastAccessTimeUtc.2";\r
DeleteDirectory (path);\r
try {\r
Directory.SetLastAccessTimeUtc (path, time);\r
// public void SetLastAccessTimeUtcException6 ()\r
// {\r
// DateTime time = new DateTime (1000, 4, 6, 6, 4, 2);\r
-// string path = TempFolder + "/DirectoryTest.SetLastAccessTimeUtc.1";\r
+// string path = TempFolder + DSC + "DirectoryTest.SetLastAccessTimeUtc.1";\r
//\r
// if (!Directory.Exists (path))\r
// Directory.CreateDirectory (path);\r
// }\r
// }\r
\r
- [ExpectedException(typeof(ArgumentNullException))] \r
+ [Test]\r
+ [ExpectedException(typeof(ArgumentNullException))]\r
public void SetCreationTimeException1 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
public void SetCreationTimeException3 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2); \r
- string path = TempFolder + "/DirectoryTest.SetCreationTime.2";\r
+ string path = TempFolder + DSC + "DirectoryTest.SetCreationTime.2";\r
DeleteDirectory (path);\r
\r
try {\r
// public void SetCreationTimeException6 ()\r
// {\r
// DateTime time = new DateTime (1003, 4, 6, 6, 4, 2);\r
-// string path = TempFolder + "/DirectoryTest.SetCreationTime.1";\r
+// string path = TempFolder + DSC + "DirectoryTest.SetCreationTime.1";\r
//\r
// if (!Directory.Exists (path)) \r
// Directory.CreateDirectory (path);\r
public void SetCreationTimeUtcException3 ()\r
{\r
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2); \r
- string path = TempFolder + "/DirectoryTest.SetLastAccessTimeUtc.2";\r
+ string path = TempFolder + DSC + "DirectoryTest.SetLastAccessTimeUtc.2";\r
DeleteDirectory (path);\r
\r
try {\r
// public void SetCreationTimeUtcException6 ()\r
// {\r
// DateTime time = new DateTime (1000, 4, 6, 6, 4, 2);\r
-// string path = TempFolder + "/DirectoryTest.SetLastAccessTimeUtc.1";\r
+// string path = TempFolder + DSC + "DirectoryTest.SetLastAccessTimeUtc.1";\r
//\r
// if (!Directory.Exists (path))\r
// Directory.CreateDirectory (path);\r
DeleteDirectory (DirPath);\r
}\r
}\r
+\r
+ [Test]\r
+ public void GetParentOfRootDirectory ()\r
+ {\r
+ DirectoryInfo info;\r
+\r
+ info = Directory.GetParent (Path.GetPathRoot (Path.GetTempPath ()));\r
+ AssertEquals (null, info);\r
+ }\r
\r
[Test]\r
public void GetFiles ()\r
\r
[Test]\r
[ExpectedException (typeof (ArgumentNullException))]\r
- public void SetCurrentDirectoryNull (string path)\r
+ public void SetCurrentDirectoryNull ()\r
{\r
Directory.SetCurrentDirectory (null);\r
}\r
\r
[Test]\r
[ExpectedException (typeof (ArgumentException))]\r
- public void SetCurrentDirectoryEmpty (string path)\r
+ public void SetCurrentDirectoryEmpty ()\r
{\r
Directory.SetCurrentDirectory (String.Empty);\r
}\r
\r
[Test]\r
[ExpectedException (typeof (ArgumentException))]\r
- public void SetCurrentDirectoryWhitespace (string path)\r
+ public void SetCurrentDirectoryWhitespace ()\r
{\r
Directory.SetCurrentDirectory (" ");\r
}\r
\r
\r
+ [Test]\r
+ public void GetNoFiles () // Bug 58875. This throwed an exception on windows.\r
+ {\r
+ DirectoryInfo dir = new DirectoryInfo (".");\r
+ dir.GetFiles ("*.nonext");\r
+ }\r
+\r
private void DeleteDirectory (string path)\r
{\r
if (Directory.Exists (path))\r