@@ -57,6 +57,19 @@ testCompareWithOpts opts name docxFile nativeFile =
5757testCompare :: String -> FilePath -> FilePath -> Test
5858testCompare = testCompareWithOpts def
5959
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)
65+
66+testForWarningsWithOpts :: ReaderOptions -> String -> FilePath -> [String] -> Test
67+testForWarningsWithOpts opts name docxFile expected =
68+ buildTest $ testForWarningsWithOptsIO opts name docxFile expected
69+
70+-- testForWarnings :: String -> FilePath -> [String] -> Test
71+-- testForWarnings = testForWarningsWithOpts def
72+
6073getMedia :: FilePath -> FilePath -> IO (Maybe B.ByteString)
6174getMedia archivePath mediaPath = do
6275 zf <- B.readFile archivePath >>= return . toArchive