summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-11-07 10:29:56 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-11-09 18:03:38 -0500
commita9b147907b69d7c5a71644f3fcba6dec3fc632f6 (patch)
tree5896e26d08b80ae83657549174e7d20a3c31751e
parentf73fbd2dac42b6f9e9c12de0134bce1298763894 (diff)
downloadhaskell-a9b147907b69d7c5a71644f3fcba6dec3fc632f6.tar.gz
testsuite: Fix putStrLn in saks028
Bizarrely, `saks028` previously failed reliably, but only on Windows (#17450). The test would exit with a zero exit code but simply didn't emit the expected text to stderr. I believe this was due to the fact that the test used `putStrLn`, resulting in the output ending up on stdout. This worked on other platforms since (apparently) we redirect stdout to stderr when evaluating splices. However, on Windows it seems that the redirected output wasn't flushed as it was on other platforms. Anyways, it seems like the right thing to do here is to be explicit about our desire for the output to end up on stderr. Closes #17450.
-rw-r--r--testsuite/tests/saks/should_compile/saks028.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/testsuite/tests/saks/should_compile/saks028.hs b/testsuite/tests/saks/should_compile/saks028.hs
index 9d15db593c..51c1e52c6b 100644
--- a/testsuite/tests/saks/should_compile/saks028.hs
+++ b/testsuite/tests/saks/should_compile/saks028.hs
@@ -3,6 +3,7 @@
module SAKS_028 where
+import System.IO
import Data.Kind
import Language.Haskell.TH hiding (Type)
@@ -10,5 +11,5 @@ type Functor' :: (Type -> Type) -> Constraint
class Functor' f
do sig <- reifyType ('' Functor')
- runIO $ putStrLn $ pprint sig
+ runIO $ hPutStrLn stderr $ pprint sig
return []