diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-06-10 18:26:44 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-06-10 18:26:44 +0200 |
commit | 94b3dacb4ea7e5e99ab62286b13877b92f9391b3 (patch) | |
tree | 4e1d9b98ebb2246c8a543163e980a927d25b0c34 /test/Tests/Command.hs | |
parent | d6822157e75432e09210350e3b58eec3998dca76 (diff) |
Changed all readers to take Text instead of String.
Readers: Renamed StringReader -> TextReader.
Updated tests.
API change.
Diffstat (limited to 'test/Tests/Command.hs')
-rw-r--r-- | test/Tests/Command.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Tests/Command.hs b/test/Tests/Command.hs index 588c0c06c..1f3694f60 100644 --- a/test/Tests/Command.hs +++ b/test/Tests/Command.hs @@ -13,6 +13,7 @@ import Test.Tasty.HUnit import Tests.Helpers import Text.Pandoc import Text.Pandoc.Shared (trimr) +import qualified Data.ByteString as BS import qualified Text.Pandoc.UTF8 as UTF8 import System.IO.Unsafe (unsafePerformIO) -- TODO temporary @@ -83,7 +84,7 @@ runCommandTest pandocpath (num, code) = extractCommandTest :: FilePath -> FilePath -> TestTree extractCommandTest pandocpath fp = unsafePerformIO $ do - contents <- UTF8.readFile ("command" </> fp) + contents <- UTF8.toText <$> BS.readFile ("command" </> fp) Pandoc _ blocks <- runIOorExplode (readMarkdown def{ readerExtensions = pandocExtensions } contents) let codeblocks = map extractCode $ filter isCodeBlock $ blocks |