From e3436179d0f51f7152695beecd90d6956e0b73d4 Mon Sep 17 00:00:00 2001 From: Jim McStanton Date: Sat, 24 Nov 2018 16:58:56 -0600 Subject: Corrected assertion in unixFilterError test --- tests/Hakyll/Core/UnixFilter/Tests.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') 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 -- cgit v1.2.3