2008-05-08 Dick Porter <dick@ximian.com>
[mono.git] / mcs / class / corlib / Test / System.IO / DirectoryCas.cs
index 7c2b60c1e190b202c1c5520668ceb3708d3ffaa7..f793f45ebd3bd3cbc2ad1fb12e416a6efa66bf89 100644 (file)
@@ -48,7 +48,7 @@ namespace MonoCasTests.System.IO {
                {
                        // this occurs with a "clean" stack (full trust)
                        dt = new MonoTests.System.IO.DirectoryTest ();
-                       dir = Path.Combine (Path.GetTempPath (), "MonoCasTests.System.IO");\r
+                       dir = Path.Combine (Path.GetTempPath (), "MonoCasTests.System.IO");
                }
 
                [SetUp]
@@ -59,21 +59,26 @@ namespace MonoCasTests.System.IO {
                        dt.SetUp ();
                }
 
-               [TearDown]\r
+               [TearDown]
                public void TearDown () 
                {
                        dt.TearDown ();
-               }\r
+               }
 
                [TestFixtureTearDown]
                public void FixtureTearDown ()
                {
-                       if (Directory.Exists (dir))\r
-                               Directory.Delete (dir, true);\r
+                       if (Directory.Exists (dir))
+                               Directory.Delete (dir, true);
                }
 
                private bool RunningOnWindows {
-                       get { return ((int) Environment.OSVersion.Platform == 128); }
+                       get {
+                               // check for non-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;
+                               return ((platform != 4) && (platform != 128));
+                       }
                }
 
                // Partial Trust Tests - i.e. call "normal" unit with reduced privileges
@@ -86,7 +91,7 @@ namespace MonoCasTests.System.IO {
                        dt.CreateDirectory ();
                        dt.Delete ();
                        dt.Exists ();
-                       dt.Move ();
+                       dt.MoveDirectory ();
                        dt.LastAccessTime ();
                        dt.LastWriteTime ();
                        dt.GetDirectories ();