projects
/
haskell-directory.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix these tests
[haskell-directory.git]
/
tests
/
copyFile002.hs
diff --git
a/tests/copyFile002.hs
b/tests/copyFile002.hs
index
332d762
..
222192b
100644
(file)
--- a/
tests/copyFile002.hs
+++ b/
tests/copyFile002.hs
@@
-12,7
+12,7
@@
main :: IO ()
main = do d <- getCurrentDirectory
flip finally (setCurrentDirectory d) $ do
setCurrentDirectory "copyFile"
main = do d <- getCurrentDirectory
flip finally (setCurrentDirectory d) $ do
setCurrentDirectory "copyFile"
- try $ removeFile to
+ tryIO $ removeFile to
cs_before <- getDirectoryContents "."
putStrLn "Before:"
print $ sort cs_before
cs_before <- getDirectoryContents "."
putStrLn "Before:"
print $ sort cs_before
@@
-22,6
+22,9
@@
main = do d <- getCurrentDirectory
print $ sort cs_before
readFile to >>= print
print $ sort cs_before
readFile to >>= print
+tryIO :: IO a -> IO (Either IOException a)
+tryIO = try
+
from, to :: FilePath
from = "source"
to = "target"
from, to :: FilePath
from = "source"
to = "target"