summaryrefslogtreecommitdiff
path: root/tests/Tests/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-05-05 16:22:56 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2016-05-05 16:22:56 -0700
commit21d1a3b57cc37cc8c13eaf24faf0743259afdb9a (patch)
tree0752595991b099bae35357b53ea76f44256a840f /tests/Tests/Readers
parentf7a5c17a63d48b26e3c676170e8673f3011cf452 (diff)
parent2d825603c684d6c7af6adb08f26ed34a078a5afe (diff)
Merge pull request #2898 from tarleb/org-table-refactoring
Org reader: table parsing code refactoring and fixes
Diffstat (limited to 'tests/Tests/Readers')
-rw-r--r--tests/Tests/Readers/Org.hs21
1 files changed, 16 insertions, 5 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs
index 6112055ba..3fab92e53 100644
--- a/tests/Tests/Readers/Org.hs
+++ b/tests/Tests/Readers/Org.hs
@@ -945,7 +945,7 @@ tests =
, "Empty table" =:
"||" =?>
- simpleTable' 1 mempty mempty
+ simpleTable' 1 mempty [[mempty]]
, "Glider Table" =:
unlines [ "| 1 | 0 | 0 |"
@@ -1000,6 +1000,17 @@ tests =
, [ plain "dynamic", plain "Lisp" ]
]
+ , "Table with empty cells" =:
+ "|||c|" =?>
+ simpleTable' 3 mempty [[mempty, mempty, plain "c"]]
+
+ , "Table with empty rows" =:
+ unlines [ "| first |"
+ , "| |"
+ , "| third |"
+ ] =?>
+ simpleTable' 1 mempty [[plain "first"], [mempty], [plain "third"]]
+
, "Table with alignment row" =:
unlines [ "| Numbers | Text | More |"
, "| <c> | <r> | |"
@@ -1028,10 +1039,10 @@ tests =
, "| 1 | One | foo |"
, "| 2"
] =?>
- table "" (zip [AlignCenter, AlignRight, AlignDefault] [0, 0, 0])
- [ plain "Numbers", plain "Text" , plain mempty ]
- [ [ plain "1" , plain "One" , plain "foo" ]
- , [ plain "2" , plain mempty , plain mempty ]
+ table "" (zip [AlignCenter, AlignRight] [0, 0])
+ [ plain "Numbers", plain "Text" ]
+ [ [ plain "1" , plain "One" , plain "foo" ]
+ , [ plain "2" ]
]
, "Table with caption" =: