diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-09-09 10:16:57 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-09-09 10:39:20 -0700 |
commit | 6dcfa7e07b42858e78ea7d29ae82782ddc9e1761 (patch) | |
tree | 1a68d542f95e5c2b2a70cd3b6eb5ad9cfd5baf16 /tests | |
parent | bee255cbfe39a00247a96c63ca5d2527200da9cf (diff) | |
download | pandoc-6dcfa7e07b42858e78ea7d29ae82782ddc9e1761.tar.gz |
Tests: docx writer tests now use "../data" for data directory.
This allows tests to be run without installing first.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Tests/Writers/Docx.hs | 5 |
1 files changed, 4 insertions, 1 deletions
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) |