summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPhilFreeman <>2015-10-20 20:31:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2015-10-20 20:31:00 (GMT)
commit02ef1718f713f0ba740b412d9c746a6528e315f0 (patch)
tree6183f46dcca728a374cb2f6d6c54da07a4a14a7e /tests
parent414866c38a08e4a8a56cc3b7e8b0712743cb9551 (diff)
version 0.7.50.7.5
Diffstat (limited to 'tests')
-rw-r--r--tests/Main.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/Main.hs b/tests/Main.hs
index 6644c8a..6d202e1 100644
--- a/tests/Main.hs
+++ b/tests/Main.hs
@@ -66,6 +66,7 @@ import System.Exit
import System.Process
import System.FilePath
import System.Directory
+import System.IO.UTF8
import qualified System.Info
import qualified System.FilePath.Glob as Glob
@@ -97,7 +98,7 @@ makeActions foreigns = (P.buildMakeActions modulesDir (error "makeActions: input
readInput :: [FilePath] -> IO [(FilePath, String)]
readInput inputFiles = forM inputFiles $ \inputFile -> do
- text <- readFile inputFile
+ text <- readUTF8File inputFile
return (inputFile, text)
type TestM = WriterT [(FilePath, String)] IO
@@ -157,7 +158,7 @@ assertDoesNotCompile inputFiles foreigns = do
where
getShouldFailWith =
- readFile
+ readUTF8File
>>> liftIO
>>> fmap ( lines
>>> mapMaybe (stripPrefix "-- @shouldFailWith ")
@@ -184,7 +185,7 @@ main = do
supportPurs <- supportFiles "purs"
supportJS <- supportFiles "js"
- foreignFiles <- forM supportJS (\f -> (f,) <$> readFile f)
+ foreignFiles <- forM supportJS (\f -> (f,) <$> readUTF8File f)
Right (foreigns, _) <- runExceptT $ runWriterT $ P.parseForeignModulesFromFiles foreignFiles
let passing = cwd </> "examples" </> "passing"