aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Readers/Man.hs
diff options
context:
space:
mode:
Diffstat (limited to 'test/Tests/Readers/Man.hs')
-rw-r--r--test/Tests/Readers/Man.hs22
1 files changed, 15 insertions, 7 deletions
diff --git a/test/Tests/Readers/Man.hs b/test/Tests/Readers/Man.hs
index 7623dcb71..7280f15f2 100644
--- a/test/Tests/Readers/Man.hs
+++ b/test/Tests/Readers/Man.hs
@@ -30,6 +30,9 @@ infix 4 =:
=> String -> (Text, c) -> TestTree
(=:) = test man
+toRow :: [Blocks] -> Row
+toRow = Row nullAttr . map simpleCell
+
tests :: [TestTree]
tests = [
-- .SH "HEllo bbb" "aaa"" as"
@@ -122,16 +125,21 @@ tests = [
testGroup "Tables" [
"t1" =:
".TS\nallbox;\nl l l.\na\tb\tc\nd\te\tf\n.TE"
- =?> table mempty (replicate 3 (AlignLeft, ColWidthDefault)) [] [
- map (plain . str ) ["a", "b", "c"],
- map (plain . str ) ["d", "e", "f"]
- ],
+ =?> table
+ emptyCaption
+ (replicate 3 (AlignLeft, ColWidthDefault))
+ (TableHead nullAttr [])
+ [TableBody nullAttr 0 [] $ map toRow
+ [map (plain . str ) ["a", "b", "c"],
+ map (plain . str ) ["d", "e", "f"]]]
+ (TableFoot nullAttr []),
"longcell" =:
".TS\n;\nr.\nT{\na\nb\nc d\nT}\nf\n.TE"
=?> table
- mempty
+ emptyCaption
[(AlignRight, ColWidthDefault)]
- []
- [[plain $ text "a b c d"], [plain $ str "f"]]
+ (TableHead nullAttr [])
+ [TableBody nullAttr 0 [] $ map toRow [[plain $ text "a b c d"], [plain $ str "f"]]]
+ (TableFoot nullAttr [])
]
]