From 6208d4e7fcf1792203b3069d0002ad5cb1ec05dd Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Mon, 20 May 2019 18:52:28 +0200 Subject: Improve output of Lua tests (#5499) This makes use of tasty-lua, a package to write tests in Lua and integrate the results into Tasty output. Test output becomes more informative: individual tests and test groups become visible in test output. Failures are reported with helpful error messages. --- test/Tests/Lua/Module.hs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/Tests/Lua/Module.hs (limited to 'test/Tests/Lua') diff --git a/test/Tests/Lua/Module.hs b/test/Tests/Lua/Module.hs new file mode 100644 index 000000000..82c9330e5 --- /dev/null +++ b/test/Tests/Lua/Module.hs @@ -0,0 +1,27 @@ +{- | +Module : Tests.Lua.Module +Copyright : © 2019 Albert Krewinkel +License : GNU GPL, version 2 or above + +Maintainer : Albert Krewinkel +Stability : alpha +Portability : portable + +Lua module tests +-} +module Tests.Lua.Module (tests) where + +import System.FilePath (()) +import Test.Tasty (TestName, TestTree) +import Test.Tasty.Lua (testLuaFile) + +import Tests.Lua (runLuaTest) + +tests :: [TestTree] +tests = + [ testPandocLua "pandoc" ("lua" "module" "pandoc.lua") + , testPandocLua "pandoc.util" ("lua" "module" "pandoc.utils.lua") + ] + +testPandocLua :: TestName -> FilePath -> TestTree +testPandocLua = testLuaFile runLuaTest -- cgit v1.2.3