aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Old.hs
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2020-09-10 18:47:40 +0200
committerGitHub <noreply@github.com>2020-09-10 09:47:40 -0700
commit9423b4b7d91b38540388d0183d49cc413538edb9 (patch)
tree2dfd2380707e9f483169ab474d116ec996f30e70 /test/Tests/Old.hs
parentc2f1fadb2ce5b0a2ba35bb656a21fdac09b9d966 (diff)
downloadpandoc-9423b4b7d91b38540388d0183d49cc413538edb9.tar.gz
Support colspans and rowspans in HTML tables (#6644)
* HTML writer: add support for row headers, colspans, rowspans * Add planet table tests See #6312
Diffstat (limited to 'test/Tests/Old.hs')
-rw-r--r--test/Tests/Old.hs21
1 files changed, 19 insertions, 2 deletions
diff --git a/test/Tests/Old.hs b/test/Tests/Old.hs
index ce0532ac8..9ae10261e 100644
--- a/test/Tests/Old.hs
+++ b/test/Tests/Old.hs
@@ -67,8 +67,11 @@ tests pandocPath =
]
]
, testGroup "html"
- [ testGroup "writer" (writerTests' "html4" ++ writerTests' "html5" ++
- lhsWriterTests' "html")
+ [ testGroup "writer" $ mconcat
+ [ extWriterTests' "html4"
+ , extWriterTests' "html5"
+ , lhsWriterTests' "html"
+ ]
, test' "reader" ["-r", "html", "-w", "native", "-s"]
"html-reader.html" "html-reader.native"
]
@@ -225,6 +228,7 @@ tests pandocPath =
fb2WriterTest' = fb2WriterTest pandocPath
lhsWriterTests' = lhsWriterTests pandocPath
lhsReaderTest' = lhsReaderTest pandocPath
+ extWriterTests' = extendedWriterTests pandocPath
-- makes sure file is fully closed after reading
readFile' :: FilePath -> IO String
@@ -260,6 +264,19 @@ writerTests pandocPath format
opts = ["-r", "native", "-w", format, "--columns=78",
"--variable", "pandoc-version="]
+extendedWriterTests :: FilePath -> String -> [TestTree]
+extendedWriterTests pandocPath format
+ = writerTests pandocPath format ++
+ [ test pandocPath
+ "tables"
+ opts
+ ("tables" </> "planets.native")
+ ("tables" </> "planets" <.> format)
+ ]
+ where
+ opts = ["-r", "native", "-w", format, "--columns=78",
+ "--variable", "pandoc-version="]
+
s5WriterTest :: FilePath -> String -> [String] -> String -> TestTree
s5WriterTest pandocPath modifier opts format
= test pandocPath (format ++ " writer (" ++ modifier ++ ")")