[commit: base] master: Fix hSetBuffering004 to work with dynamic ghci (fb92baf)
Ian Lynagh
igloo at earth.li
Sun Jun 16 21:43:38 CEST 2013
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch : master
https://github.com/ghc/packages-base/commit/fb92bafc5ea59732a31829e26e340f8dc67575d1
>---------------------------------------------------------------
commit fb92bafc5ea59732a31829e26e340f8dc67575d1
Author: Ian Lynagh <ian at well-typed.com>
Date: Sun Jun 16 20:23:49 2013 +0100
Fix hSetBuffering004 to work with dynamic ghci
We need to actually consume the rest of stdin, or ghci will try
to interpret it as commands.
>---------------------------------------------------------------
tests/IO/hSetBuffering004.hs | 1 +
tests/IO/hSetBuffering004.stdout | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/tests/IO/hSetBuffering004.hs b/tests/IO/hSetBuffering004.hs
index eaee682..01b9aae 100644
--- a/tests/IO/hSetBuffering004.hs
+++ b/tests/IO/hSetBuffering004.hs
@@ -7,3 +7,4 @@ main :: IO ()
main = do hSetBuffering stdin NoBuffering
hLookAhead stdin >>= print
hSetBuffering stdin LineBuffering
+ getContents >>= print
diff --git a/tests/IO/hSetBuffering004.stdout b/tests/IO/hSetBuffering004.stdout
index 7766eec..a7c3946 100644
--- a/tests/IO/hSetBuffering004.stdout
+++ b/tests/IO/hSetBuffering004.stdout
@@ -1 +1,2 @@
'-'
+"-- test for #2678\nmodule Main (main) where\n\nimport System.IO\n\nmain :: IO ()\nmain = do hSetBuffering stdin NoBuffering\n hLookAhead stdin >>= print\n hSetBuffering stdin LineBuffering\n getContents >>= print\n"
More information about the ghc-commits
mailing list