aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2017-11-22 15:23:09 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2017-11-22 15:23:09 +0300
commitc8ab4789b63422d27b03379ceea413e3fcffd577 (patch)
tree26474488f1c3f31848df53802cace6531d9de12d /test
parent87e10ac28be163a6319ad482c5a207275b23a2a0 (diff)
downloadpandoc-c8ab4789b63422d27b03379ceea413e3fcffd577.tar.gz
Muse reader: add more multiline definition tests
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Readers/Muse.hs25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index 0960c8af2..279572ad1 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -732,6 +732,31 @@ tests =
definitionList [ ("First term", [ para "Definition of first term\nand its continuation." ])
, ("Second term", [ para "Definition of second term." ])
]
+ , test emacsMuse "Multi-line definition lists from Emacs Muse manual"
+ (T.unlines
+ [ "Term1 ::"
+ , " This is a first definition"
+ , " And it has two lines;"
+ , "no, make that three."
+ , ""
+ , "Term2 :: This is a second definition"
+ ] =?>
+ definitionList [ ("Term1", [ para "This is a first definition\nAnd it has two lines;\nno, make that three."])
+ , ("Term2", [ para "This is a second definition"])
+ ])
+ -- Text::Amuse requires indentation with one space
+ , "Multi-line definition lists from Emacs Muse manual with initial space" =:
+ (T.unlines
+ [ " Term1 ::"
+ , " This is a first definition"
+ , " And it has two lines;"
+ , "no, make that three."
+ , ""
+ , " Term2 :: This is a second definition"
+ ] =?>
+ definitionList [ ("Term1", [ para "This is a first definition\nAnd it has two lines;\nno, make that three."])
+ , ("Term2", [ para "This is a second definition"])
+ ])
-- Emacs Muse creates two separate lists when indentation of items is different.
-- We follow Amusewiki and allow different indentation within one list.
, "Changing indentation" =: