Skip to content

Commit

Permalink
Moved CPP in test file.
Browse files Browse the repository at this point in the history
This will more accurately show the number of tests run.
  • Loading branch information
jgm committed Feb 21, 2016
1 parent 7c48514 commit e124609
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/test-zip-archive.hs
Expand Up @@ -34,7 +34,9 @@ main = do
, testAddFilesOptions
, testDeleteEntries
, testExtractFiles
#ifndef _WINDOWS
, testExtractFilesWithPosixAttrs
#endif
]
removeDirectoryRecursive "test-temp"
exitWith $ case errors res of
Expand Down Expand Up @@ -107,7 +109,6 @@ testExtractFiles = TestCase $ do

testExtractFilesWithPosixAttrs :: Test
testExtractFilesWithPosixAttrs = TestCase $ do
#ifndef _WINDOWS
createDirectory "test-temp/dir3"
let hiMsg = "hello there"
writeFile "test-temp/dir3/hi" hiMsg
Expand All @@ -118,8 +119,5 @@ testExtractFilesWithPosixAttrs = TestCase $ do
extractFilesFromArchive [OptVerbose] archive
hi <- readFile "test-temp/dir3/hi"
fm <- fmap fileMode $ getFileStatus "test-temp/dir3/hi"
assertEqual "file modes" (intersectFileModes perms fm) perms
assertEqual "file modes" (intersectFileModes perms fm) perms
assertEqual "contents of test-temp/dir3/hi" hiMsg hi
#else
return ()
#endif

0 comments on commit e124609

Please sign in to comment.