Lua filter tests: produce better error on test failure
This commit is contained in:
parent
4264a1b143
commit
dba5c8d4e3
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue