# Depends on binary from previous run, which gets removed by the driver way=ghci
test('getPermissions001', omit_ways(['ghci']), compile_and_run, ['-cpp'])
+
+test('copyFile001', normal, compile_and_run, [''])
--- /dev/null
+This is the data
\ No newline at end of file
--- /dev/null
+
+module Main (main) where
+
+import Control.Exception
+import Data.List
+import System.Directory
+import System.IO
+
+main :: IO ()
+main = do try $ removeFile to
+ cs_before <- getDirectoryContents "copyFile"
+ putStrLn "Before:"
+ print $ sort cs_before
+ copyFile from to
+ cs_before <- getDirectoryContents "copyFile"
+ putStrLn "After:"
+ print $ sort cs_before
+ readFile to >>= print
+
+from, to :: FilePath
+from = "copyFile/source"
+to = "copyFile/target"
+
--- /dev/null
+Before:
+[".","..","source"]
+After:
+[".","..","source","target"]
+"This is the data"