diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2021-12-29 15:00:59 +0200 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2021-12-29 15:00:59 +0200 |
commit | b4361712899fd0183fea5513180cb383979616de (patch) | |
tree | 688ab7ee2ab3a8cd32b4e37b506099aec95388f7 /test/Tests/Shared.hs | |
parent | 726ad97faebe59e024d68d293e663c02bbe423c8 (diff) | |
parent | d960282b105a6469c760b4308a3b81da723b7256 (diff) | |
download | pandoc-b4361712899fd0183fea5513180cb383979616de.tar.gz |
Merge https://github.com/jgm/pandoc
Diffstat (limited to 'test/Tests/Shared.hs')
-rw-r--r-- | test/Tests/Shared.hs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Tests/Shared.hs b/test/Tests/Shared.hs index e415ea153..5365812fe 100644 --- a/test/Tests/Shared.hs +++ b/test/Tests/Shared.hs @@ -56,6 +56,7 @@ testLegacyTable :: [TestTree] testLegacyTable = [ testCase "decomposes a table with head" $ gen1 @?= expect1 , testCase "decomposes a table without head" $ gen2 @?= expect2 + , testCase "decomposes the table from issue 7683" $ gen3 @?= expect3 ] where pln = toList . plain . str @@ -110,3 +111,18 @@ testLegacyTable = ,[pln "j", mempty, mempty]] ) gen2 = toLegacyTable emptyCaption spec1 (th []) [body1] (tf footRows1) + + spec3 = replicate 4 (AlignDefault, ColWidthDefault) + body3 = tb 0 + [] + [[cl "a" 2 1, cl "b" 1 2, cl "c" 2 1] + ,[cl "d" 1 1, cl "e" 1 1] + ] + expect3 = ( [] + , replicate 4 AlignDefault + , replicate 4 0 + , [] + , [[pln "a", pln "b", mempty, pln "c"] + ,[mempty, pln "d", pln "e", mempty]] + ) + gen3 = toLegacyTable emptyCaption spec3 (th []) [body3] (tf []) |