diff options
author | Andrew Dunning <adunning@users.noreply.github.com> | 2017-09-08 07:06:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-08 07:06:50 +0100 |
commit | 51bb7453e41e5e7e28a60cb22cb4f4d082b7fbdf (patch) | |
tree | bbcd5f299fa513065e3bcb3f274f1b895a899301 /test/Tests | |
parent | 3654c4373a2f4db8d4ab771937ad318a6921ac37 (diff) | |
parent | 732005456e2b28150943a5a4e11bca6e1566f309 (diff) |
Merge branch 'master' into patch-1
Diffstat (limited to 'test/Tests')
-rw-r--r-- | test/Tests/Readers/Muse.hs | 43 | ||||
-rw-r--r-- | test/Tests/Readers/RST.hs | 13 |
2 files changed, 51 insertions, 5 deletions
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs index 1f3218daf..dac167a92 100644 --- a/test/Tests/Readers/Muse.hs +++ b/test/Tests/Readers/Muse.hs @@ -145,6 +145,38 @@ tests = , " with a continuation" ] =?> blockQuote (para "This is a quotation with a continuation") + , testGroup "Div" + [ "Div without id" =: + "<div>Foo bar</div>" =?> + divWith nullAttr (para "Foo bar") + , "Div with id" =: + "<div id=\"foo\">Foo bar</div>" =?> + divWith ("foo", [], []) (para "Foo bar") + ] + , "Verse" =: + T.unlines [ "> This is" + , "> First stanza" + , ">" -- Emacs produces verbatim ">" here, we follow Amusewiki + , "> And this is" + , "> Second stanza" + , ">" + , "" + , ">" + , "" + , "> Another verse" + , "> is here" + ] =?> + lineBlock [ "This is" + , "First stanza" + , "" + , "And this is" + , "\160\160Second stanza" + , "" + ] <> + lineBlock [ "" ] <> + lineBlock [ "Another verse" + , "\160\160\160is here" + ] ] , "Quote tag" =: "<quote>Hello, world</quote>" =?> blockQuote (para $ text "Hello, world") , "Verse tag" =: @@ -178,20 +210,21 @@ tests = ] , testGroup "Headers" [ "Part" =: - "* First level\n" =?> + "* First level" =?> header 1 "First level" , "Chapter" =: - "** Second level\n" =?> + "** Second level" =?> header 2 "Second level" , "Section" =: - "*** Third level\n" =?> + "*** Third level" =?> header 3 "Third level" , "Subsection" =: - "**** Fourth level\n" =?> + "**** Fourth level" =?> header 4 "Fourth level" , "Subsubsection" =: - "***** Fifth level\n" =?> + "***** Fifth level" =?> header 5 "Fifth level" + , "Whitespace is required after *" =: "**Not a header" =?> para "**Not a header" , "No headers in footnotes" =: T.unlines [ "Foo[1]" , "[1] * Bar" diff --git a/test/Tests/Readers/RST.hs b/test/Tests/Readers/RST.hs index 61a2673f5..928fc1a99 100644 --- a/test/Tests/Readers/RST.hs +++ b/test/Tests/Readers/RST.hs @@ -136,6 +136,19 @@ tests = [ "line block with blank line" =: para "but must stop here") , "line block with 3 lines" =: "| a\n| b\n| c" =?> lineBlock ["a", "b", "c"] + , "line blocks with blank lines" =: T.unlines + [ "|" + , "" + , "|" + , "| a" + , "| b" + , "|" + , "" + , "|" + ] =?> + lineBlock [""] <> + lineBlock ["", "a", "b", ""] <> + lineBlock [""] , "quoted literal block using >" =: "::\n\n> quoted\n> block\n\nOrdinary paragraph" =?> codeBlock "> quoted\n> block" <> para "Ordinary paragraph" , "quoted literal block using | (not a line block)" =: "::\n\n| quoted\n| block\n\nOrdinary paragraph" |