From 6f6f515401a29d26eaa5daae308b8e700abd4c04 Mon Sep 17 00:00:00 2001 From: Thomas Miedema Date: Fri, 17 Jun 2016 15:23:34 +0200 Subject: 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 --- libraries/base/tests/IO/readwrite003.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'libraries/base/tests') 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 -- cgit v1.2.1