git.iko.soy/typeable/pandoc
on master help sign in
Muse reader: add more multiline definition tests
commitc8ab4789b63422d27b03379ceea413e3fcffd577 authorAlexander Krotov <ilabdsf@gmail.com> dateWed 22 Nov 2017, 15:23 (9 years ago) parent87e10ac
1 file changed+25
test/Tests/Readers/Muse.hs+25
test/Tests/Readers/Muse.hs+25
@@ -732,6 +732,31 @@ tests =
732732 definitionList [ ("First term", [ para "Definition of first term\nand its continuation." ])
733733 , ("Second term", [ para "Definition of second term." ])
734734 ]
735+ , test emacsMuse "Multi-line definition lists from Emacs Muse manual"
736+ (T.unlines
737+ [ "Term1 ::"
738+ , " This is a first definition"
739+ , " And it has two lines;"
740+ , "no, make that three."
741+ , ""
742+ , "Term2 :: This is a second definition"
743+ ] =?>
744+ definitionList [ ("Term1", [ para "This is a first definition\nAnd it has two lines;\nno, make that three."])
745+ , ("Term2", [ para "This is a second definition"])
746+ ])
747+ -- Text::Amuse requires indentation with one space
748+ , "Multi-line definition lists from Emacs Muse manual with initial space" =:
749+ (T.unlines
750+ [ " Term1 ::"
751+ , " This is a first definition"
752+ , " And it has two lines;"
753+ , "no, make that three."
754+ , ""
755+ , " Term2 :: This is a second definition"
756+ ] =?>
757+ definitionList [ ("Term1", [ para "This is a first definition\nAnd it has two lines;\nno, make that three."])
758+ , ("Term2", [ para "This is a second definition"])
759+ ])
735760 -- Emacs Muse creates two separate lists when indentation of items is different.
736761 -- We follow Amusewiki and allow different indentation within one list.
737762 , "Changing indentation" =: