aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests/Writers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-11-27 16:38:46 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-01-25 17:07:40 +0100
commit18e85f8dfbf9323945969cdf831c9a16f90299a0 (patch)
treec47adf1787d486874c54e18b9d19821fc0ca5433 /tests/Tests/Writers
parentbf8fb78389c0d2dc06ad91bc379fde5bd7e1f768 (diff)
downloadpandoc-18e85f8dfbf9323945969cdf831c9a16f90299a0.tar.gz
Changed readNative to use PandocMonad.
Diffstat (limited to 'tests/Tests/Writers')
-rw-r--r--tests/Tests/Writers/Docx.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/Tests/Writers/Docx.hs b/tests/Tests/Writers/Docx.hs
index a76583796..cdaa2c097 100644
--- a/tests/Tests/Writers/Docx.hs
+++ b/tests/Tests/Writers/Docx.hs
@@ -21,10 +21,12 @@ compareOutput opts nativeFileIn nativeFileOut = do
nf <- Prelude.readFile nativeFileIn
nf' <- Prelude.readFile nativeFileOut
let wopts = fst opts
- df <- runIOorExplode $ writeDocx wopts{writerUserDataDir = Just (".." </> "data")}
- (handleError $ readNative nf)
+ df <- runIOorExplode $ do
+ d <- handleError <$> readNative nf
+ writeDocx wopts{writerUserDataDir = Just (".." </> "data")} d
+ df' <- handleError <$> runIOorExplode (readNative nf')
let (p, _) = handleError $ readDocx (snd opts) df
- return (p, handleError $ readNative nf')
+ return (p, df')
testCompareWithOptsIO :: Options -> String -> FilePath -> FilePath -> IO Test
testCompareWithOptsIO opts name nativeFileIn nativeFileOut = do