aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-06-10 23:39:49 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-06-11 00:46:31 +0200
commitfa719d026464619dd51714620470998ab5d18e17 (patch)
tree9eb4eeaff01a2c6f3ccb283ff57d07ef5f622beb /test/Tests/Readers
parent0c2a509dfb3bd9f7ba8a0fdec02a165ed7cf49da (diff)
downloadpandoc-fa719d026464619dd51714620470998ab5d18e17.tar.gz
Switched Writer types to use Text.
* XML.toEntities: changed type to Text -> Text. * Shared.tabFilter -- fixed so it strips out CRs as before. * Modified writers to take Text. * Updated tests, benchmarks, trypandoc. [API change] Closes #3731.
Diffstat (limited to 'test/Tests/Readers')
-rw-r--r--test/Tests/Readers/Docx.hs3
-rw-r--r--test/Tests/Readers/LaTeX.hs2
-rw-r--r--test/Tests/Readers/Odt.hs4
3 files changed, 6 insertions, 3 deletions
diff --git a/test/Tests/Readers/Docx.hs b/test/Tests/Readers/Docx.hs
index e29f0acad..e55c3529b 100644
--- a/test/Tests/Readers/Docx.hs
+++ b/test/Tests/Readers/Docx.hs
@@ -3,6 +3,7 @@ module Tests.Readers.Docx (tests) where
import Codec.Archive.Zip
import qualified Data.ByteString.Lazy as B
import qualified Data.ByteString as BS
+import qualified Data.Text as T
import qualified Data.Map as M
import Test.Tasty
import Test.Tasty.HUnit
@@ -27,7 +28,7 @@ defopts :: ReaderOptions
defopts = def{ readerExtensions = getDefaultExtensions "docx" }
instance ToString NoNormPandoc where
- toString d = purely (writeNative def{ writerTemplate = s }) $ toPandoc d
+ toString d = T.unpack $ purely (writeNative def{ writerTemplate = s }) $ toPandoc d
where s = case d of
NoNormPandoc (Pandoc (Meta m) _)
| M.null m -> Nothing
diff --git a/test/Tests/Readers/LaTeX.hs b/test/Tests/Readers/LaTeX.hs
index 390d80df9..afac9e8cb 100644
--- a/test/Tests/Readers/LaTeX.hs
+++ b/test/Tests/Readers/LaTeX.hs
@@ -6,7 +6,7 @@ import Tests.Helpers
import Text.Pandoc
import Text.Pandoc.Arbitrary ()
import Text.Pandoc.Builder
-import Data.Text (Text, pack)
+import Data.Text (Text)
import qualified Data.Text as T
latex :: Text -> Pandoc
diff --git a/test/Tests/Readers/Odt.hs b/test/Tests/Readers/Odt.hs
index 61ccc8819..eed3a33b0 100644
--- a/test/Tests/Readers/Odt.hs
+++ b/test/Tests/Readers/Odt.hs
@@ -5,6 +5,7 @@ import qualified Data.ByteString.Lazy as B
import qualified Data.ByteString as BS
import qualified Text.Pandoc.UTF8 as UTF8
import qualified Data.Map as M
+import Data.Text (unpack)
import Test.Tasty
import Tests.Helpers
import Text.Pandoc
@@ -41,7 +42,8 @@ newtype NoNormPandoc = NoNormPandoc {unNoNorm :: Pandoc}
deriving ( Show )
instance ToString NoNormPandoc where
- toString d = purely (writeNative def{ writerTemplate = s }) $ toPandoc d
+ toString d = unpack $
+ purely (writeNative def{ writerTemplate = s }) $ toPandoc d
where s = case d of
NoNormPandoc (Pandoc (Meta m) _)
| M.null m -> Nothing