From 3871a73e0f2041a956dd69417ebc29b08cd554b8 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 15 Jul 2017 09:14:17 +0200 Subject: Rearrange docx writer roundtrip test. I'm hoping this gives reproducible results on ghc 8.2.1. --- test/Tests/Writers/Docx.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test') 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 -- cgit v1.2.3