aboutsummaryrefslogtreecommitdiff
path: root/test/Tests
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-04-29 16:20:38 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-04-29 16:20:38 +0300
commit4139e3e92b9ee88bd3e689e06113c96726988dae (patch)
tree664c9acc4abe1d92973067aa80775ff0d434c1a9 /test/Tests
parent5ce91a7e01ba3d9362d91c838052e33729efd6ec (diff)
downloadpandoc-4139e3e92b9ee88bd3e689e06113c96726988dae.tar.gz
Test Lua filter converting display math to inline math
Diffstat (limited to 'test/Tests')
-rw-r--r--test/Tests/Lua.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/Tests/Lua.hs b/test/Tests/Lua.hs
index b401e4e65..28a691715 100644
--- a/test/Tests/Lua.hs
+++ b/test/Tests/Lua.hs
@@ -12,7 +12,8 @@ import Test.Tasty.QuickCheck (QuickCheckTests (..), ioProperty, testProperty)
import Text.Pandoc.Arbitrary ()
import Text.Pandoc.Builder (bulletList, divWith, doc, doubleQuoted, emph,
header, linebreak, para, plain, rawBlock,
- singleQuoted, space, str, strong)
+ singleQuoted, space, str, strong,
+ math, displayMath)
import Text.Pandoc.Class (runIOorExplode, setUserDataDir)
import Text.Pandoc.Definition (Block (BlockQuote, Div, Para), Inline (Emph, Str),
Attr, Meta, Pandoc, pandocTypesVersion)
@@ -48,6 +49,12 @@ tests = map (localOption (QuickCheckTests 20))
(doc $ bulletList [plain (str "alfa"), plain (str "bravo")])
(doc $ bulletList [para (str "alfa"), para (str "bravo")])
+ , testCase "convert display math to inline math" $
+ assertFilterConversion "display math becomes inline math"
+ "math.lua"
+ (doc $ para (displayMath "5+5"))
+ (doc $ para (math "5+5"))
+
, testCase "make hello world document" $
assertFilterConversion "Document contains 'Hello, World!'"
"hello-world-doc.lua"