summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-07-15 09:14:17 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-07-15 09:14:17 +0200
commit3871a73e0f2041a956dd69417ebc29b08cd554b8 (patch)
tree61d058364b826f87151eb86605ad5f9af633939d
parent4e9e1bae7cdd3d5317ac4d57346215c34dfc7358 (diff)
Rearrange docx writer roundtrip test.
I'm hoping this gives reproducible results on ghc 8.2.1.
-rw-r--r--test/Tests/Writers/Docx.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/Tests/Writers/Docx.hs b/test/Tests/Writers/Docx.hs
index fae41e9d4..a3e73b479 100644
--- a/test/Tests/Writers/Docx.hs
+++ b/test/Tests/Writers/Docx.hs
@@ -22,12 +22,12 @@ compareOutput :: Options
compareOutput (wopts, ropts) nativeFileIn nativeFileOut = do
nf <- UTF8.toText <$> BS.readFile nativeFileIn
nf' <- UTF8.toText <$> BS.readFile nativeFileOut
- df <- runIOorExplode $
- readNative def nf >>=
+ runIOorExplode $ do
+ roundtripped <- readNative def nf >>=
writeDocx wopts{writerUserDataDir = Just (".." </> "data")} >>=
readDocx ropts
- df' <- runIOorExplode (readNative def nf')
- return (df, df')
+ orig <- readNative def nf'
+ return (roundtripped, orig)
testCompareWithOptsIO :: Options -> String -> FilePath -> FilePath -> IO TestTree
testCompareWithOptsIO opts name nativeFileIn nativeFileOut = do