aboutsummaryrefslogtreecommitdiff
path: root/test/Tests
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2017-08-22 23:12:39 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2017-08-22 23:30:48 +0200
commit41baaff32737e57dd9ec0a1153416ca24a12dca1 (patch)
treeca88cf3b4f2bbc08e2f0704d0a5b9c6bb6c07ff6 /test/Tests
parent56fb854ad85dafff2016892bd6d2c5d24423bff0 (diff)
downloadpandoc-41baaff32737e57dd9ec0a1153416ca24a12dca1.tar.gz
Text.Pandoc.Lua: support Inline and Block catch-alls
Try function `Inline`/`Block` if no other filter function of the respective type matches an element. Closes: #3859
Diffstat (limited to 'test/Tests')
-rw-r--r--test/Tests/Lua.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Tests/Lua.hs b/test/Tests/Lua.hs
index 06f100048..fea813890 100644
--- a/test/Tests/Lua.hs
+++ b/test/Tests/Lua.hs
@@ -70,6 +70,12 @@ tests = map (localOption (QuickCheckTests 20))
"metatable-catch-all.lua"
(doc . para $ "four words, three spaces")
(doc . para $ str "7")
+
+ , testCase "Count blocks via Block-specific catch-all" $
+ assertFilterConversion "filtering with Block catch-all failed"
+ "block-count.lua"
+ (doc $ para "one" <> para "two")
+ (doc $ para "2")
]
assertFilterConversion :: String -> FilePath -> Pandoc -> Pandoc -> Assertion