aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Writers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-06-10 18:26:44 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-06-10 18:26:44 +0200
commit94b3dacb4ea7e5e99ab62286b13877b92f9391b3 (patch)
tree4e1d9b98ebb2246c8a543163e980a927d25b0c34 /test/Tests/Writers
parentd6822157e75432e09210350e3b58eec3998dca76 (diff)
downloadpandoc-94b3dacb4ea7e5e99ab62286b13877b92f9391b3.tar.gz
Changed all readers to take Text instead of String.
Readers: Renamed StringReader -> TextReader. Updated tests. API change.
Diffstat (limited to 'test/Tests/Writers')
-rw-r--r--test/Tests/Writers/Docx.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/Tests/Writers/Docx.hs b/test/Tests/Writers/Docx.hs
index 2d7179199..215952893 100644
--- a/test/Tests/Writers/Docx.hs
+++ b/test/Tests/Writers/Docx.hs
@@ -10,6 +10,8 @@ import Text.Pandoc.Readers.Docx
import Text.Pandoc.Readers.Native
import Text.Pandoc.Writers.Docx
import System.IO.Unsafe (unsafePerformIO) -- TODO temporary
+import qualified Data.ByteString as BS
+import qualified Text.Pandoc.UTF8 as UTF8
type Options = (WriterOptions, ReaderOptions)
@@ -18,8 +20,8 @@ compareOutput :: Options
-> FilePath
-> IO (Pandoc, Pandoc)
compareOutput opts nativeFileIn nativeFileOut = do
- nf <- Prelude.readFile nativeFileIn
- nf' <- Prelude.readFile nativeFileOut
+ nf <- UTF8.toText <$> BS.readFile nativeFileIn
+ nf' <- UTF8.toText <$> BS.readFile nativeFileOut
let wopts = fst opts
df <- runIOorExplode $ do
d <- readNative def nf