make this test work on Windows
authorSimon Marlow <simonmar@microsoft.com>
Tue, 5 Feb 2008 14:54:50 +0000 (14:54 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Tue, 5 Feb 2008 14:54:50 +0000 (14:54 +0000)
I have no idea why it worked before

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