summaryrefslogtreecommitdiff
path: root/tests/Hakyll/Core/UnixFilter/Tests.hs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Hakyll/Core/UnixFilter/Tests.hs')
-rw-r--r--tests/Hakyll/Core/UnixFilter/Tests.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/Hakyll/Core/UnixFilter/Tests.hs b/tests/Hakyll/Core/UnixFilter/Tests.hs
index 521d051..63d6698 100644
--- a/tests/Hakyll/Core/UnixFilter/Tests.hs
+++ b/tests/Hakyll/Core/UnixFilter/Tests.hs
@@ -39,7 +39,7 @@ unixFilterRev = do
provider <- newTestProvider store
output <- testCompilerDone store provider testMarkdown compiler
expected <- testCompilerDone store provider testMarkdown getResourceString
- H.assert $ rev (itemBody expected) == lines (itemBody output)
+ rev (itemBody expected) H.@=? lines (itemBody output)
cleanTestEnv
where
compiler = getResourceString >>= withItemBody (unixFilter "rev" [])
@@ -52,9 +52,9 @@ unixFilterFalse = do
store <- newTestStore
provider <- newTestProvider store
result <- testCompiler store provider testMarkdown compiler
- H.assert $ case result of
- CompilerError es -> any ("exit code" `isInfixOf`) es
- _ -> False
+ case result of
+ CompilerError es -> True H.@=? any ("exit code" `isInfixOf`) es
+ _ -> H.assertFailure "Expecting CompilerError"
cleanTestEnv
where
compiler = getResourceString >>= withItemBody (unixFilter "false" [])
@@ -66,9 +66,9 @@ unixFilterError = do
store <- newTestStore
provider <- newTestProvider store
result <- testCompiler store provider testMarkdown compiler
- H.assert $ case result of
- CompilerError es -> any ("invalid option" `isInfixOf`) es
- _ -> False
+ case result of
+ CompilerError es -> True H.@=? any ("invalid option" `isInfixOf`) es
+ _ -> H.assertFailure "Expecting CompilerError"
cleanTestEnv
where
- compiler = getResourceString >>= withItemBody (unixFilter "head" ["-#"]) \ No newline at end of file
+ compiler = getResourceString >>= withItemBody (unixFilter "head" ["-#"])