aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Command.hs4
-rw-r--r--test/Tests/Writers/OOXML.hs5
2 files changed, 6 insertions, 3 deletions
diff --git a/test/Tests/Command.hs b/test/Tests/Command.hs
index e0c5a8408..ac5050163 100644
--- a/test/Tests/Command.hs
+++ b/test/Tests/Command.hs
@@ -100,8 +100,8 @@ runCommandTest pandocpath num code =
extractCommandTest :: FilePath -> FilePath -> TestTree
extractCommandTest pandocpath fp = unsafePerformIO $ do
contents <- UTF8.toText <$> BS.readFile ("command" </> fp)
- Pandoc _ blocks <- runIOorExplode (readMarkdown
- def{ readerExtensions = pandocExtensions } contents)
+ Pandoc _ blocks <- runIOorExplode $
+ readMarkdown def{ readerExtensions = pandocExtensions } contents
let codeblocks = map extractCode $ filter isCodeBlock blocks
let cases = zipWith (runCommandTest pandocpath) [1..] codeblocks
return $ testGroup fp cases
diff --git a/test/Tests/Writers/OOXML.hs b/test/Tests/Writers/OOXML.hs
index f2762ddfe..509f5d6a8 100644
--- a/test/Tests/Writers/OOXML.hs
+++ b/test/Tests/Writers/OOXML.hs
@@ -56,7 +56,10 @@ testArchive :: (WriterOptions -> Pandoc -> PandocIO BL.ByteString)
-> IO Archive
testArchive writerFn opts fp = do
txt <- T.readFile fp
- bs <- runIOorExplode $ readNative def txt >>= writerFn opts
+ bs <- runIOorExplode $ do
+ initializeDataFiles
+ setUserDataDir (Just "../data")
+ readNative def txt >>= writerFn opts
return $ toArchive bs
compareFileList :: FilePath -> Archive -> Archive -> Maybe String