From: simonmar Date: Tue, 11 Apr 2000 09:40:19 +0000 (+0000) Subject: [project @ 2000-04-11 09:40:19 by simonmar] X-Git-Tag: Approximately_9120_patches~4751 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=9cb1bb00b6b7ab1d47949b3123624f6d053c393a;p=ghc-hetmet.git [project @ 2000-04-11 09:40:19 by simonmar] Add nested hPutStr/tracing test --- diff --git a/ghc/tests/io/should_run/Makefile b/ghc/tests/io/should_run/Makefile index bc747f6..6cc9f8c 100644 --- a/ghc/tests/io/should_run/Makefile +++ b/ghc/tests/io/should_run/Makefile @@ -6,6 +6,7 @@ HC_OPTS += -dcore-lint io022_HC_OPTS += -fglasgow-exts io010_HC_OPTS += -fglasgow-exts io011_HC_OPTS += -fglasgow-exts +io032_HC_OPTS += -fglasgow-exts io004_RUNTEST_OPTS += -x 42 io016_RUNTEST_OPTS += io016.hs io016.out diff --git a/ghc/tests/io/should_run/io018.hs b/ghc/tests/io/should_run/io018.hs index ac392aa..02b24bb 100644 --- a/ghc/tests/io/should_run/io018.hs +++ b/ghc/tests/io/should_run/io018.hs @@ -17,13 +17,13 @@ main = do hSetBuffering cd NoBuffering hPutStr cd speakString hSeek cd AbsoluteSeek 0 - speak cd `catch` \ err -> if isEOFError err then putStrLn "\nCaught EOF" else fail err + speak cd `catch` \ err -> if isEOFError err then putStrLn "\nCaught EOF" else ioError err hSeek cd AbsoluteSeek 0 hSetBuffering cd LineBuffering - speak cd `catch` \ err -> if isEOFError err then putStrLn "\nCaught EOF" else fail err + speak cd `catch` \ err -> if isEOFError err then putStrLn "\nCaught EOF" else ioError err hSeek cd AbsoluteSeek 0 hSetBuffering cd (BlockBuffering Nothing) - speak cd `catch` \ err -> if isEOFError err then putStrLn "\nCaught EOF" else fail err + speak cd `catch` \ err -> if isEOFError err then putStrLn "\nCaught EOF" else ioError err speakString = "Someone wants to speak with you\n" diff --git a/ghc/tests/io/should_run/io032.hs b/ghc/tests/io/should_run/io032.hs new file mode 100644 index 0000000..5e340e0 --- /dev/null +++ b/ghc/tests/io/should_run/io032.hs @@ -0,0 +1,10 @@ +import IO +import IOExts + +main = do + hPutStr stderr + (trace (trace (trace (trace (trace (trace (trace + "one" "fish") "two") "fish") "red") "fish") "blue") "fish") + hPutStr stdout + (trace (trace (trace (trace (trace (trace (trace + "one" "fish") "two") "fish") "red") "fish") "blue") "fish") diff --git a/ghc/tests/io/should_run/io032.stderr b/ghc/tests/io/should_run/io032.stderr new file mode 100644 index 0000000..3b8ac7a --- /dev/null +++ b/ghc/tests/io/should_run/io032.stderr @@ -0,0 +1,14 @@ +one +fish +two +fish +red +fish +blue +fishone +fish +two +fish +red +fish +blue diff --git a/ghc/tests/io/should_run/io032.stdout b/ghc/tests/io/should_run/io032.stdout new file mode 100644 index 0000000..5b19477 --- /dev/null +++ b/ghc/tests/io/should_run/io032.stdout @@ -0,0 +1 @@ +fish \ No newline at end of file