Skip to content

Commit

Permalink
Test withFilePath: increase number of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodigrim committed Sep 15, 2023
1 parent 87c4b73 commit 29a6131
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions tests/Test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -254,16 +254,17 @@ posix010 = testCase "posix010" $ do

testWithFilePath :: TestTree
testWithFilePath =
testGroup "withFilePath"
[ testProperty "ByteString" $
\xs -> let ys = B.pack $ filter (/= 0) xs in
ioProperty $ BSFP.withFilePath ys
(\ptr -> (=== ys) <$> B.packCString ptr)
, testProperty "PosixPath" $
\xs -> let ys = Sh.pack $ filter (/= 0) xs in
ioProperty $ PPFP.withFilePath (PosixString ys)
(\ptr -> (=== ys) <$> Sh.packCString ptr)
]
adjustOption (\(QuickCheckTests n) -> QuickCheckTests (n `max` 10000)) $
testGroup "withFilePath"
[ testProperty "ByteString" $
\xs -> let ys = B.pack $ filter (/= 0) xs in
ioProperty $ BSFP.withFilePath ys
(\ptr -> (=== ys) <$> B.packCString ptr)
, testProperty "PosixPath" $
\xs -> let ys = Sh.pack $ filter (/= 0) xs in
ioProperty $ PPFP.withFilePath (PosixString ys)
(\ptr -> (=== ys) <$> Sh.packCString ptr)
]

-------------------------------------------------------------------------------
-- Utils
Expand Down

0 comments on commit 29a6131

Please sign in to comment.