Skip to content
Snippets Groups Projects
Commit 56cba054 authored by Bodigrim's avatar Bodigrim Committed by Xia Li-yao
Browse files

Tests: do not assume that system locale is Unicode-compatible

parent f2eaf978
No related branches found
No related tags found
No related merge requests found
......@@ -248,11 +248,13 @@ write_read unline filt writer reader nl buf ts = ioProperty $
t = unline . map (filt (not . (`elem` "\r\n"))) $ ts
act = withTempFile $ \path h -> do
IO.hSetEncoding h IO.utf8
IO.hSetNewlineMode h nl
IO.hSetBuffering h buf
() <- writer h t
IO.hClose h
bracket (IO.openFile path IO.ReadMode) IO.hClose $ \h' -> do
IO.hSetEncoding h' IO.utf8
IO.hSetNewlineMode h' nl
IO.hSetBuffering h' buf
r <- reader h'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment