summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2013-04-04 00:26:05 +0200
committerJasper Van der Jeugt <m@jaspervdj.be>2013-04-04 00:26:05 +0200
commitcbfc7c18e1aa6c498d2fc7bdecf2f127b6582dbd (patch)
treeabf6e6492f1d8e1588056daec95ef000d609b1f9 /tests
parentc40cf286afacd130c1ddd28abacb3c484895076b (diff)
downloadhakyll-cbfc7c18e1aa6c498d2fc7bdecf2f127b6582dbd.tar.gz
Debug info for Alternative instances
See #126
Diffstat (limited to 'tests')
-rw-r--r--tests/Hakyll/Core/UnixFilter/Tests.hs4
-rw-r--r--tests/TestSuite/Util.hs3
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/Hakyll/Core/UnixFilter/Tests.hs b/tests/Hakyll/Core/UnixFilter/Tests.hs
index 04051e3..92c2904 100644
--- a/tests/Hakyll/Core/UnixFilter/Tests.hs
+++ b/tests/Hakyll/Core/UnixFilter/Tests.hs
@@ -49,8 +49,8 @@ unixFilterFalse = do
provider <- newTestProvider store
result <- testCompiler store provider "russian.md" compiler
H.assert $ case result of
- CompilerError e -> "exit code" `isInfixOf` e
- _ -> False
+ CompilerError es -> any ("exit code" `isInfixOf`) es
+ _ -> False
cleanTestEnv
where
compiler = getResourceString >>= withItemBody (unixFilter "false" [])
diff --git a/tests/TestSuite/Util.hs b/tests/TestSuite/Util.hs
index ef8768c..e727ecb 100644
--- a/tests/TestSuite/Util.hs
+++ b/tests/TestSuite/Util.hs
@@ -12,6 +12,7 @@ module TestSuite.Util
--------------------------------------------------------------------------------
+import Data.List (intercalate)
import Data.Monoid (mempty)
import qualified Data.Set as S
import Test.Framework
@@ -78,7 +79,7 @@ testCompilerDone store provider underlying compiler = do
CompilerDone x _ -> return x
CompilerError e -> error $
"TestSuite.Util.testCompilerDone: compiler " ++ show underlying ++
- " threw: " ++ e
+ " threw: " ++ intercalate "; " e
CompilerRequire i _ -> error $
"TestSuite.Util.testCompilerDone: compiler " ++ show underlying ++
" requires: " ++ show i