@@ -57,6 +57,19 @@ testCompareWithOpts opts name docxFile nativeFile =
57testCompare :: String -> FilePath -> FilePath -> Test
57testCompare :: String -> FilePath -> FilePath -> Test
58testCompare = testCompareWithOpts def
58testCompare = testCompareWithOpts def
60+testForWarningsWithOptsIO :: ReaderOptions -> String -> FilePath -> [String] -> IO Test
61+testForWarningsWithOptsIO opts name docxFile expected = do
62+ df <- B.readFile docxFile
63+ let (_, _, warns) = handleError $ readDocxWithWarnings opts df
64+ return $ test id name (unlines warns, unlines expected)
66+testForWarningsWithOpts :: ReaderOptions -> String -> FilePath -> [String] -> Test
67+testForWarningsWithOpts opts name docxFile expected =
68+ buildTest $ testForWarningsWithOptsIO opts name docxFile expected
70+-- testForWarnings :: String -> FilePath -> [String] -> Test
71+-- testForWarnings = testForWarningsWithOpts def
60getMedia :: FilePath -> FilePath -> IO (Maybe B.ByteString)
73getMedia :: FilePath -> FilePath -> IO (Maybe B.ByteString)
61getMedia archivePath mediaPath = do
74getMedia archivePath mediaPath = do
62 zf <- B.readFile archivePath >>= return . toArchive
75 zf <- B.readFile archivePath >>= return . toArchive