Stop the copyFile00{1,2} tests tripping over each other
authorIan Lynagh <igloo@earth.li>
Fri, 13 Mar 2009 21:13:57 +0000 (21:13 +0000)
committerIan Lynagh <igloo@earth.li>
Fri, 13 Mar 2009 21:13:57 +0000 (21:13 +0000)
tests/copyFile001.hs
tests/copyFile001dir/source [moved from tests/copyFile/source with 100% similarity]
tests/copyFile002.hs
tests/copyFile002dir/source [new file with mode: 0644]

index e039bec..0a59af2 100644 (file)
@@ -8,19 +8,19 @@ import System.IO
 
 main :: IO ()
 main = do tryIO $ removeFile to
-          cs_before <- getDirectoryContents "copyFile"
+          cs_before <- getDirectoryContents "copyFile001dir"
           putStrLn "Before:"
           print $ sort cs_before
           copyFile from to
-          cs_before <- getDirectoryContents "copyFile"
+          cs_before <- getDirectoryContents "copyFile001dir"
           putStrLn "After:"
           print $ sort cs_before
           readFile to >>= print
 
 tryIO :: IO a -> IO (Either IOException a)
-tryIO = try 
+tryIO = try
 
 from, to :: FilePath
-from = "copyFile/source"
-to   = "copyFile/target"
+from = "copyFile001dir/source"
+to   = "copyFile001dir/target"
 
index 222192b..66c79cd 100644 (file)
@@ -11,7 +11,7 @@ import System.IO
 main :: IO ()
 main = do d <- getCurrentDirectory
           flip finally (setCurrentDirectory d) $ do
-          setCurrentDirectory "copyFile"
+          setCurrentDirectory "copyFile002dir"
           tryIO $ removeFile to
           cs_before <- getDirectoryContents "."
           putStrLn "Before:"
@@ -23,7 +23,7 @@ main = do d <- getCurrentDirectory
           readFile to >>= print
 
 tryIO :: IO a -> IO (Either IOException a)
-tryIO = try 
+tryIO = try
 
 from, to :: FilePath
 from = "source"
diff --git a/tests/copyFile002dir/source b/tests/copyFile002dir/source
new file mode 100644 (file)
index 0000000..1b44515
--- /dev/null
@@ -0,0 +1 @@
+This is the data
\ No newline at end of file