@@ -3,7 +3,7 @@ module Tests.Writers.Docx (tests) where
33import System.FilePath ((</>))
44import Test.Tasty
55import Tests.Helpers
6−import Text.Pandoc.Class (runIOorExplode)
6+import Text.Pandoc.Class (runIOorExplode, setUserDataDir)
77import Text.Pandoc.Definition
88import Text.Pandoc.Options
99import Text.Pandoc.Walk
@@ -24,9 +24,9 @@ compareOutput (wopts, ropts) nativeFileIn nativeFileOut = do
2424 nf <- UTF8.toText <$> BS.readFile nativeFileIn
2525 nf' <- UTF8.toText <$> BS.readFile nativeFileOut
2626 runIOorExplode $ do
27+ setUserDataDir $ Just (".." </> "data")
2728 roundtripped <- readNative def nf >>=
28− writeDocx wopts{writerUserDataDir = Just (".." </> "data")} >>=
29− readDocx ropts
29+ writeDocx wopts >>= readDocx ropts
3030 orig <- readNative def nf'
3131 return (walk fixImages roundtripped, walk fixImages orig)
3232