Commit 767c1b72 authored by batterseapower's avatar batterseapower
Browse files

Attempt to fix decodingerror002 test for non-UTF8 locales

parent dddb294d
......@@ -3,7 +3,12 @@ import System.IO
import System.IO.Error
import GHC.IO.Handle (hSetEncoding)
main = alltests "decodingerror002.in"
main = do
-- Explicitly set stdout encoding so that the UTF8//ROUNDTRIP
-- test is always able to write the surrogate byte out without error.
enc <- mkTextEncoding "UTF8//ROUNDTRIP"
hSetEncoding stdout enc
alltests "decodingerror002.in"
alltests file = mapM (test file) ["UTF8",
"UTF8//IGNORE",
......
Left decodingerror002.in: hGetChar: invalid argument (invalid byte sequence)
Left decodingerror002.in: hGetChar: end of file
�Left decodingerror002.in: hGetChar: end of file
Left <stdout>: hPutChar: invalid argument (invalid character)
ÈLeft decodingerror002.in: hGetChar: end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment