diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Hakyll/Core/UnixFilter/Tests.hs | 4 |
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 |