diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-06-11 21:18:42 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-06-11 21:18:42 +0200 |
commit | f5d2d77ed94432a94f7ca4c23ec1a4ae559eed65 (patch) | |
tree | 6e8812285e448080e84252e37f389765e47e2b83 /test | |
parent | 49b738de4e9babe727a8e48f22a90eacbdd63847 (diff) | |
download | pandoc-f5d2d77ed94432a94f7ca4c23ec1a4ae559eed65.tar.gz |
Revert "Command tests: small change to try to fix appveyor failures."
This reverts commit 0ab26ac9ebb0196691ec064820eac4e640f0d52c.
Failed experiment.
Diffstat (limited to 'test')
-rw-r--r-- | test/Tests/Command.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/Tests/Command.hs b/test/Tests/Command.hs index 316408c93..1f3694f60 100644 --- a/test/Tests/Command.hs +++ b/test/Tests/Command.hs @@ -2,7 +2,6 @@ module Tests.Command (findPandoc, runTest, tests) where import Data.Algorithm.Diff -import qualified Data.Text as T import Data.List (isSuffixOf) import Prelude hiding (readFile) import System.Directory @@ -14,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 @@ -84,10 +84,9 @@ 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 } - (T.pack contents)) + def{ readerExtensions = pandocExtensions } contents) let codeblocks = map extractCode $ filter isCodeBlock $ blocks let cases = map (runCommandTest pandocpath) $ zip [1..] codeblocks return $ testGroup fp cases |