diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2016-06-17 15:23:34 +0200 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2016-06-18 12:46:05 +0200 |
commit | 6f6f515401a29d26eaa5daae308b8e700abd4c04 (patch) | |
tree | 26c8c55437ec56debd68a3079e488ff339dee58f /libraries/base/tests | |
parent | f72f23f9f6ff2914ec99fc86f67c89927f18ba47 (diff) | |
download | haskell-6f6f515401a29d26eaa5daae308b8e700abd4c04.tar.gz |
Testsuite: write "\n" instead of "\r\n" when using mingw Python
Mingw style Python uses '\r\n' by default for newlines. This is
annoying, because it means that when a GHC developer on Windows uses
mingw Python to `make accept` a test, every single line of the
.stderr file is touched. This makes it difficult to spot the real
changes, and it leads to unnecessary git history bloat.
Prevent this from happening by using io.open instead of open.
See `Note [Universal newlines]`
Reviewed by: Phyx
Differential Revision: https://phabricator.haskell.org/D2342
Diffstat (limited to 'libraries/base/tests')
-rw-r--r-- | libraries/base/tests/IO/readwrite003.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libraries/base/tests/IO/readwrite003.hs b/libraries/base/tests/IO/readwrite003.hs index d7ee78d637..c8995e3e7d 100644 --- a/libraries/base/tests/IO/readwrite003.hs +++ b/libraries/base/tests/IO/readwrite003.hs @@ -9,4 +9,5 @@ main = do hPutStrLn h "yz" hClose h h <- openBinaryFile file ReadMode + hSetNewlineMode stdout noNewlineTranslation hGetContents h >>= putStr |