aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Command.hs
diff options
context:
space:
mode:
Diffstat (limited to 'test/Tests/Command.hs')
-rw-r--r--test/Tests/Command.hs3
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