Rearrange docx writer roundtrip test.

I'm hoping this gives reproducible results on ghc 8.2.1.
This commit is contained in:
John MacFarlane 2017-07-15 09:14:17 +02:00
parent 4e9e1bae7c
commit 3871a73e0f

View file

@ -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