aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2018-09-19 21:27:07 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2018-09-19 21:36:19 +0200
commitdba5c8d4e39c0bedf2a46191ad393bf84620bee5 (patch)
treef508e9709827a6aa7befa631fa8620274b666fbe /test
parent4264a1b1437f4b5885cf907aede821c8d611dff9 (diff)
downloadpandoc-dba5c8d4e39c0bedf2a46191ad393bf84620bee5.tar.gz
Lua filter tests: produce better error on test failure
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Lua.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/Tests/Lua.hs b/test/Tests/Lua.hs
index f00142f1d..361b25297 100644
--- a/test/Tests/Lua.hs
+++ b/test/Tests/Lua.hs
@@ -7,7 +7,7 @@ import Control.Monad (when)
import Data.Version (Version (versionBranch))
import System.FilePath ((</>))
import Test.Tasty (TestTree, localOption)
-import Test.Tasty.HUnit (Assertion, assertEqual, testCase)
+import Test.Tasty.HUnit (Assertion, assertEqual, assertFailure, testCase)
import Test.Tasty.QuickCheck (QuickCheckTests (..), ioProperty, testProperty)
import Text.Pandoc.Arbitrary ()
import Text.Pandoc.Builder (bulletList, divWith, doc, doubleQuoted, emph,
@@ -179,7 +179,7 @@ assertFilterConversion msg filterPath docIn docExpected = do
setUserDataDir (Just "../data")
runLuaFilter def ("lua" </> filterPath) [] docIn
case docEither of
- Left _ -> fail "lua filter failed"
+ Left exception -> assertFailure (show exception)
Right docRes -> assertEqual msg docExpected docRes
roundtripEqual :: (Eq a, Lua.FromLuaStack a, Lua.ToLuaStack a) => a -> IO Bool