From 6dcfa7e07b42858e78ea7d29ae82782ddc9e1761 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 9 Sep 2015 10:16:57 -0700 Subject: Tests: docx writer tests now use "../data" for data directory. This allows tests to be run without installing first. --- tests/Tests/Writers/Docx.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3