make this test work on Windows
[haskell-directory.git] / tests / doesDirectoryExist001.hs
index be26ec0..2548183 100644 (file)
@@ -1,4 +1,11 @@
+{-# LANGUAGE CPP #-}
 -- !!! "/" was not recognised as a directory in 6.0.x
 import System.Directory
-main = doesDirectoryExist "/" >>= print
 
+#ifdef mingw32_HOST_OS
+root = "C:\\"
+#else
+root = "/"
+#endif
+
+main = doesDirectoryExist root >>= print