aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Tests/Readers/Org.hs9
-rw-r--r--tests/Tests/Writers/Docx.hs5
-rw-r--r--tests/Tests/Writers/RST.hs25
3 files changed, 38 insertions, 1 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs
index 5eed2c9f4..52aaea52e 100644
--- a/tests/Tests/Readers/Org.hs
+++ b/tests/Tests/Readers/Org.hs
@@ -1143,6 +1143,15 @@ tests =
]
]
+ , "Verse block with newlines" =:
+ unlines [ "#+BEGIN_VERSE"
+ , "foo"
+ , ""
+ , "bar"
+ , "#+END_VERSE"
+ ] =?>
+ para ("foo" <> linebreak <> linebreak <> "bar")
+
, "LaTeX fragment" =:
unlines [ "\\begin{equation}"
, "X_i = \\begin{cases}"
diff --git a/tests/Tests/Writers/Docx.hs b/tests/Tests/Writers/Docx.hs
index 068c5a935..8dba0ea55 100644
--- a/tests/Tests/Writers/Docx.hs
+++ b/tests/Tests/Writers/Docx.hs
@@ -8,6 +8,7 @@ import Test.Framework
import Text.Pandoc.Readers.Docx
import Text.Pandoc.Writers.Docx
import Text.Pandoc.Error
+import System.FilePath ((</>))
type Options = (WriterOptions, ReaderOptions)
@@ -16,7 +17,9 @@ compareOutput :: Options
-> IO (Pandoc, Pandoc)
compareOutput opts nativeFile = do
nf <- Prelude.readFile nativeFile
- df <- writeDocx (fst opts) (handleError $ readNative nf)
+ let wopts = fst opts
+ df <- writeDocx wopts{writerUserDataDir = Just (".." </> "data")}
+ (handleError $ readNative nf)
let (p, _) = handleError $ readDocx (snd opts) df
return (p, handleError $ readNative nf)
diff --git a/tests/Tests/Writers/RST.hs b/tests/Tests/Writers/RST.hs
index 2a511782f..bb7b2a446 100644
--- a/tests/Tests/Writers/RST.hs
+++ b/tests/Tests/Writers/RST.hs
@@ -75,5 +75,30 @@ tests = [ testGroup "rubrics"
, ""
, "Header 2"
, "--------"]
+ , "minimal heading levels" =:
+ header 2 (text "Header 1") <>
+ header 3 (text "Header 2") <>
+ header 2 (text "Header 1") <>
+ header 4 (text "Header 2") <>
+ header 5 (text "Header 3") <>
+ header 3 (text "Header 2") =?>
+ unlines
+ [ "Header 1"
+ , "--------"
+ , ""
+ , "Header 2"
+ , "~~~~~~~~"
+ , ""
+ , "Header 1"
+ , "--------"
+ , ""
+ , "Header 2"
+ , "~~~~~~~~"
+ , ""
+ , "Header 3"
+ , "^^^^^^^^"
+ , ""
+ , "Header 2"
+ , "~~~~~~~~"]
]
]