aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-11-09 14:19:17 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-11-14 17:58:44 +0300
commitc61b67410ac9f30786dd8e5c73cf2a7bbdbcd02c (patch)
treeccfaf27480c833189b0953acb8a45846f204d0f5 /test
parent195b3af8b63bed91d565d8745e75f07509bb595d (diff)
downloadpandoc-c61b67410ac9f30786dd8e5c73cf2a7bbdbcd02c.tar.gz
Muse reader: add grid tables support
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Readers/Muse.hs43
1 files changed, 43 insertions, 0 deletions
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index 42dec0ffd..0f9f2d92f 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -976,6 +976,49 @@ tests =
[[plain "1", plain "2", plain "3"],
[plain "4", mempty, plain "6"],
[plain "7", plain "8", plain "9"]]
+ , "Grid table" =:
+ T.unlines
+ [ "+-----+-----+"
+ , "| foo | bar |"
+ , "+-----+-----+"
+ ] =?>
+ table mempty [(AlignDefault, 0.0), (AlignDefault, 0.0)]
+ []
+ [[para "foo", para "bar"]]
+ , "Grid table inside list" =:
+ T.unlines
+ [ " - +-----+-----+"
+ , " | foo | bar |"
+ , " +-----+-----+"
+ ] =?>
+ bulletList [table mempty [(AlignDefault, 0.0), (AlignDefault, 0.0)]
+ []
+ [[para "foo", para "bar"]]]
+ , "Grid table with two rows" =:
+ T.unlines
+ [ "+-----+-----+"
+ , "| foo | bar |"
+ , "+-----+-----+"
+ , "| bat | baz |"
+ , "+-----+-----+"
+ ] =?>
+ table mempty [(AlignDefault, 0.0), (AlignDefault, 0.0)]
+ []
+ [[para "foo", para "bar"]
+ ,[para "bat", para "baz"]]
+ , "Grid table inside grid table" =:
+ T.unlines
+ [ "+-----+"
+ , "|+---+|"
+ , "||foo||"
+ , "|+---+|"
+ , "+-----+"
+ ] =?>
+ table mempty [(AlignDefault, 0.0)]
+ []
+ [[table mempty [(AlignDefault, 0.0)]
+ []
+ [[para "foo"]]]]
]
, testGroup "Lists"
[ "Bullet list" =: