@@ -8,20 +8,23 @@ import Test.Framework
88import qualified Data.ByteString.Lazy as B
99import Text.Pandoc.Readers.Docx
1010
11−compareOutput :: FilePath -> FilePath -> IO (Pandoc, Pandoc)
12−compareOutput docxFile nativeFile = do
11+compareOutput :: ReaderOptions -> FilePath -> FilePath -> IO (Pandoc, Pandoc)
12+compareOutput opts docxFile nativeFile = do
1313 df <- B.readFile docxFile
1414 nf <- Prelude.readFile nativeFile
15− return $ (readDocx def df, readNative nf)
15+ return $ (readDocx opts df, readNative nf)
1616
17−testCompare' :: String -> FilePath -> FilePath -> IO Test
18−testCompare' name docxFile nativeFile = do
19− (dp, np) <- compareOutput docxFile nativeFile
17+testCompareWithOptsIO :: ReaderOptions -> String -> FilePath -> FilePath -> IO Test
18+testCompareWithOptsIO opts name docxFile nativeFile = do
19+ (dp, np) <- compareOutput opts docxFile nativeFile
2020 return $ test id name (dp, np)
2121
22+testCompareWithOpts :: ReaderOptions -> String -> FilePath -> FilePath -> Test
23+testCompareWithOpts opts name docxFile nativeFile =
24+ buildTest $ testCompareWithOptsIO opts name docxFile nativeFile
25+
2226testCompare :: String -> FilePath -> FilePath -> Test
23−testCompare name docxFile nativeFile =
24− buildTest $ testCompare' name docxFile nativeFile
27+testCompare = testCompareWithOpts def
2528
2629
2730tests :: [Test]