aboutsummaryrefslogtreecommitdiff
path: root/test/Tests
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2017-12-19 21:31:30 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2017-12-20 21:36:41 +0100
commit299e452463b07f16a434a847612cae1ab7a8132f (patch)
tree9f8dc78ff16cdc3294c81b60a61c5e4e6c97419f /test/Tests
parent2b2dae8b471065a12ea2bd670e472317b1bd688a (diff)
downloadpandoc-299e452463b07f16a434a847612cae1ab7a8132f.tar.gz
Test more pandoc Lua module functions
The functions `sha1`, `read`, and `pipe` are now tested. Change: minor
Diffstat (limited to 'test/Tests')
-rw-r--r--test/Tests/Lua.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Tests/Lua.hs b/test/Tests/Lua.hs
index 4f14a834b..0e76249fe 100644
--- a/test/Tests/Lua.hs
+++ b/test/Tests/Lua.hs
@@ -91,6 +91,17 @@ tests = map (localOption (QuickCheckTests 20))
"attr-test.lua"
(doc $ divWith ("", [], kv_before) (para "nil"))
(doc $ divWith ("", [], kv_after) (para "nil"))
+
+ , testCase "Test module pandoc.utils" $
+ assertFilterConversion "pandoc.utils doesn't work as expected."
+ "test-pandoc-utils.lua"
+ (doc $ para "doesn't matter")
+ (doc $ mconcat [ plain (str "sha1: OK")
+ , plain (str "pipe: OK")
+ , plain (str "failing pipe: OK")
+ , plain (str "read: OK")
+ , plain (str "failing read: OK")
+ ])
]
assertFilterConversion :: String -> FilePath -> Pandoc -> Pandoc -> Assertion