summaryrefslogtreecommitdiff
path: root/tests/Hakyll
diff options
context:
space:
mode:
authorJim McStanton <jim.h.stanton@gmail.com>2018-11-24 16:58:56 -0600
committerJasper Van der Jeugt <jaspervdj@gmail.com>2018-11-24 23:58:56 +0100
commite3436179d0f51f7152695beecd90d6956e0b73d4 (patch)
tree3b1d177ecede353840d30f1e9756ce5c724f866b /tests/Hakyll
parenta7f72c5ab15862cb344ee5d7d81e128d0c5e8f85 (diff)
downloadhakyll-e3436179d0f51f7152695beecd90d6956e0b73d4.tar.gz
Corrected assertion in unixFilterError test
Diffstat (limited to 'tests/Hakyll')
-rw-r--r--tests/Hakyll/Core/UnixFilter/Tests.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/Hakyll/Core/UnixFilter/Tests.hs b/tests/Hakyll/Core/UnixFilter/Tests.hs
index 63d6698..29e2cbf 100644
--- a/tests/Hakyll/Core/UnixFilter/Tests.hs
+++ b/tests/Hakyll/Core/UnixFilter/Tests.hs
@@ -67,8 +67,10 @@ unixFilterError = do
provider <- newTestProvider store
result <- testCompiler store provider testMarkdown compiler
case result of
- CompilerError es -> True H.@=? any ("invalid option" `isInfixOf`) es
+ CompilerError es -> True H.@=? any containsIncorrectOptionMessage es
_ -> H.assertFailure "Expecting CompilerError"
cleanTestEnv
where
compiler = getResourceString >>= withItemBody (unixFilter "head" ["-#"])
+ incorrectOptionMessages = ["invalid option", "illegal option"]
+ containsIncorrectOptionMessage output = any (`isInfixOf` output) incorrectOptionMessages