TESTS: don't use lazy IO -.-

This commit is contained in:
Julian Ospald 2016-06-05 14:55:21 +02:00
parent 4f047dbc77
commit c5bcb90b65
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28
2 changed files with 3 additions and 6 deletions

View File

@ -180,10 +180,10 @@ spec = beforeAll_ upTmpDir $ before_ setupFiles $ after_ cleanupFiles $
,"outputDir1/foo2/foo4"
,"outputDir1/foo2/foo4/inputFile6"
,"outputDir1/foo2/foo4/inputFile4"])
sort c `shouldBe` sort shouldC
deleteFile' "outputDir1/foo2/inputFile1"
deleteFile' "outputDir1/foo2/inputFile2"
deleteFile' "outputDir1/foo2/inputFile3"
sort c `shouldBe` sort shouldC
it "copyDirRecursive (Strict, CollectFailures), no write permission on output dir" $

View File

@ -34,10 +34,7 @@ import System.IO.Unsafe
(
unsafePerformIO
)
import System.Posix.Directory.Traversals
(
allDirectoryContents
)
import qualified System.Posix.Directory.Traversals as DT
import System.Posix.Env.ByteString
(
getEnv
@ -283,5 +280,5 @@ writeFile' ip bs =
allDirectoryContents' :: ByteString -> IO [ByteString]
{-# NOINLINE allDirectoryContents' #-}
allDirectoryContents' ip =
withTmpDir ip $ \p -> allDirectoryContents (P.fromAbs p)
withTmpDir ip $ \p -> DT.allDirectoryContents' (P.fromAbs p)