New test.
[mono.git] / mcs / class / corlib / Test / System.IO / DirectoryCas.cs
index 7c2b60c1e190b202c1c5520668ceb3708d3ffaa7..de42f26365e02e279974e510efba59c7a7fb76e4 100644 (file)
@@ -73,7 +73,12 @@ namespace MonoCasTests.System.IO {
                }
 
                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