on master help sign in
Corrected assertion in unixFilterError test
commite3436179d0f51f7152695beecd90d6956e0b73d4 authorJim McStanton <jim.h.stanton@gmail.com> dateSat 24 Nov 2018, 16:58 (8 years ago) parenta7f72c5
1 file changed+3−1
tests/Hakyll/Core/UnixFilter/Tests.hs+3−1
tests/Hakyll/Core/UnixFilter/Tests.hs+3−1
@@ -67,8 +67,10 @@ unixFilterError = do
6767 provider <- newTestProvider store
6868 result <- testCompiler store provider testMarkdown compiler
6969 case result of
70− CompilerError es -> True H.@=? any ("invalid option" `isInfixOf`) es
70+ CompilerError es -> True H.@=? any containsIncorrectOptionMessage es
7171 _ -> H.assertFailure "Expecting CompilerError"
7272 cleanTestEnv
7373 where
7474 compiler = getResourceString >>= withItemBody (unixFilter "head" ["-#"])
75+ incorrectOptionMessages = ["invalid option", "illegal option"]
76+ containsIncorrectOptionMessage output = any (`isInfixOf` output) incorrectOptionMessages