diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2016-12-01 12:47:05 -0500 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-01-25 17:07:40 +0100 |
commit | 5ede57122ce61d1504e81c6429ff26c38490aee6 (patch) | |
tree | 1bfb24bda19ee17aa63f795e949b6f65545263fb /tests/Tests/Readers/Odt.hs | |
parent | 3574b98f81c2c24f7ef31f8251ba88792a2c06f0 (diff) | |
download | pandoc-5ede57122ce61d1504e81c6429ff26c38490aee6.tar.gz |
Update all tests to use new readers and error structure.
Diffstat (limited to 'tests/Tests/Readers/Odt.hs')
-rw-r--r-- | tests/Tests/Readers/Odt.hs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/Tests/Readers/Odt.hs b/tests/Tests/Readers/Odt.hs index 0ff527130..db9184107 100644 --- a/tests/Tests/Readers/Odt.hs +++ b/tests/Tests/Readers/Odt.hs @@ -5,7 +5,7 @@ import Text.Pandoc.Options import Text.Pandoc.Readers.Native import Text.Pandoc.Readers.Markdown import Text.Pandoc.Definition -import Text.Pandoc.Class (runIOorExplode) +import Text.Pandoc.Class (runIOorExplode, runIO, withMediaBag) import Tests.Helpers import Test.Framework import qualified Data.ByteString.Lazy as B @@ -63,17 +63,16 @@ compareOdtToNative :: TestCreator compareOdtToNative opts odtPath nativePath = do nativeFile <- Prelude.readFile nativePath odtFile <- B.readFile odtPath - native <- getNoNormVia id "native" <$> - runIOorExplode (readNative nativeFile) - let odt = getNoNormVia fst "odt" $ readOdt opts odtFile + native <- getNoNormVia id "native" <$> runIO (readNative nativeFile) + odt <- getNoNormVia id "odt" <$> runIO (readOdt opts odtFile) return (odt,native) compareOdtToMarkdown :: TestCreator compareOdtToMarkdown opts odtPath markdownPath = do markdownFile <- Prelude.readFile markdownPath odtFile <- B.readFile odtPath - let markdown = getNoNormVia id "markdown" $ readMarkdown opts markdownFile - let odt = getNoNormVia fst "odt" $ readOdt opts odtFile + markdown <- getNoNormVia id "markdown" <$> runIO (readMarkdown opts markdownFile) + odt <- getNoNormVia id "odt" <$> runIO (readOdt opts odtFile) return (odt,markdown) |