diff options
Diffstat (limited to 'tests/Tests/Readers/RST.hs')
-rw-r--r-- | tests/Tests/Readers/RST.hs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/Tests/Readers/RST.hs b/tests/Tests/Readers/RST.hs index 622f5e48b..06a15ad98 100644 --- a/tests/Tests/Readers/RST.hs +++ b/tests/Tests/Readers/RST.hs @@ -4,7 +4,7 @@ module Tests.Readers.RST (tests) where import Text.Pandoc.Definition import Test.Framework import Tests.Helpers -import Tests.Arbitrary() +import Text.Pandoc.Arbitrary() import Text.Pandoc.Builder import Text.Pandoc import Text.Pandoc.Error @@ -19,8 +19,7 @@ infix 4 =: tests :: [Test] tests = [ "line block with blank line" =: - "| a\n|\n| b" =?> para (str "a") <> - para (str "\160b") + "| a\n|\n| b" =?> lineBlock [ "a", mempty, "\160b" ] , testGroup "field list" [ "general" =: unlines [ "para" @@ -135,7 +134,7 @@ tests = [ "line block with blank line" =: codeBlock "block quotes\n\ncan go on for many lines" <> para "but must stop here") , "line block with 3 lines" =: "| a\n| b\n| c" - =?> para ("a" <> linebreak <> "b" <> linebreak <> "c") + =?> lineBlock ["a", "b", "c"] , "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" @@ -164,4 +163,13 @@ tests = [ "line block with blank line" =: =?> para (codeWith ("", ["lhs", "haskell", "sourceCode"], []) "text") , "unknown role" =: ":unknown:`text`" =?> para (str "text") ] + , testGroup "footnotes" + [ "remove space before note" =: unlines + [ "foo [1]_" + , "" + , ".. [1]" + , " bar" + ] =?> + (para $ "foo" <> (note $ para "bar")) + ] ] |