From 17b04995161847494f00e7e7a6ecdff3d5775266 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Mon, 9 Apr 2018 01:05:38 +0300 Subject: Muse reader: add support for Text:Amuse multiline headings --- test/Tests/Readers/Muse.hs | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'test/Tests') diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs index 77b18e066..11eebbdc0 100644 --- a/test/Tests/Readers/Muse.hs +++ b/test/Tests/Readers/Muse.hs @@ -558,18 +558,32 @@ tests = ] =?> headerWith ("bar",[],[]) 2 "Foo" , "Headers don't consume anchors separated with a blankline" =: - T.unlines [ "** Foo" - , "" + T.unlines [ "; A comment to make sure anchor is not parsed as a directive" , "#bar" + , "" + , "** Foo" + ] =?> + para (spanWith ("bar", [], []) mempty) <> + header 2 "Foo" + , "Headers terminate paragraph" =: + T.unlines [ "foo" + , "* bar" ] =?> - header 2 "Foo" <> - para (spanWith ("bar", [], []) mempty) + para "foo" <> header 1 "bar" , "Headers terminate lists" =: T.unlines [ " - foo" , "* bar" ] =?> bulletList [ para "foo" ] <> header 1 "bar" + , test emacsMuse "Paragraphs terminate Emacs Muse headers" + (T.unlines [ "* Foo" + , "bar" + ] =?> header 1 "Foo" <> para "bar") + , "Paragraphs don't terminate Text::Amuse headers" =: + T.unlines [ "* Foo" + , "bar" + ] =?> header 1 "Foo\nbar" ] , testGroup "Directives" [ "Title" =: -- cgit v1.2.3