Skip to content

Commit

Permalink
Use rawSystem, not callCommand.
Browse files Browse the repository at this point in the history
This is available in all versions of process,
and it is more robust (no funny differences between shells).
  • Loading branch information
jgm committed Feb 12, 2018
1 parent c4553b5 commit 8bfba65
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test-zip-archive.hs
Expand Up @@ -16,7 +16,7 @@ import System.IO.Temp (withTempDirectory)
#ifndef _WINDOWS
import System.FilePath.Posix
import System.Posix.Files
import System.Process (callCommand)
import System.Process (rawSystem)
#else
import System.FilePath.Windows
#endif
Expand Down Expand Up @@ -208,7 +208,8 @@ testArchiveAndUnzip tmpDir = TestCase $ do
removeDirectoryRecursive testDir
let zipFile = tmpDir </> "testUnzip.zip"
BL.writeFile zipFile $ fromArchive archive
callCommand $ "unzip " ++ zipFile
ec <- rawSystem "unzip" [zipFile]
assertBool "unzip succeeds" $ ec == ExitSuccess
let symlinkDir = testDir </> "link_to_directory"
symlinkFile = testDir </> "link_to_file"
isDirSymlink <- pathIsSymbolicLink symlinkDir
Expand Down

0 comments on commit 8bfba65

Please sign in to comment.