aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-03-25 01:18:33 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-03-25 01:18:33 +0300
commit4a8993f9b008a0ff223b5a1e283ae9e21a66c5c0 (patch)
treefab8ceb0dc8b999a1e08a1c87c5e4a8171153dcc /test
parentd58b961a6d83a9f3a815d7aa281c692281954a00 (diff)
downloadpandoc-4a8993f9b008a0ff223b5a1e283ae9e21a66c5c0.tar.gz
Muse writer: improve span writing
Test more cases when span has or hasn't anchor, class and contents in different combinations.
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Writers/Muse.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/Tests/Writers/Muse.hs b/test/Tests/Writers/Muse.hs
index 1218bc7c9..c3a6a9d62 100644
--- a/test/Tests/Writers/Muse.hs
+++ b/test/Tests/Writers/Muse.hs
@@ -400,9 +400,15 @@ tests = [ testGroup "block elements"
, "[1] Foo"
]
, "span with class" =: spanWith ("",["foobar"],[]) (text "Some text")
- =?> "<class name=\"foobar\">Some text</class>"
- , "span with anchor" =: spanWith ("anchor", [], []) (text "Foo bar")
+ =?> "<class name=\"foobar\">Some text</class>"
+ , "span without class" =: spanWith ("",[],[]) (text "Some text")
+ =?> "<class>Some text</class>"
+ , "span with anchor" =: spanWith ("anchor", [], []) (mempty) <> (text "Foo bar")
=?> "#anchor Foo bar"
+ , "empty span with anchor" =: spanWith ("anchor", [], []) (mempty)
+ =?> "#anchor"
+ , "empty span without class and anchor" =: spanWith ("", [], []) (mempty)
+ =?> "<class><verbatim></verbatim></class>"
, "span with class and anchor" =: spanWith ("anchor", ["foo"], []) (text "bar")
=?> "#anchor <class name=\"foo\">bar</class>"
, "adjacent spans" =: spanWith ("", ["syllable"], []) (str "wa") <>