From 9c532da6faaeca6c9c54e70b1fdc1b071dca0350 Mon Sep 17 00:00:00 2001 From: simonpj Date: Fri, 26 Jan 2001 09:58:05 +0000 Subject: [PATCH] [project @ 2001-01-26 09:58:05 by simonpj] Add dupChan test --- ghc/tests/concurrent/should_run/conc025.hs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 ghc/tests/concurrent/should_run/conc025.hs create mode 100644 ghc/tests/concurrent/should_run/conc025.stdout diff --git a/ghc/tests/concurrent/should_run/conc025.hs b/ghc/tests/concurrent/should_run/conc025.hs new file mode 100644 index 0000000..2ff5e93 --- /dev/null +++ b/ghc/tests/concurrent/should_run/conc025.hs @@ -0,0 +1,16 @@ +-- !!! Simple test of dupChan +-- Embarassingly, the published version fails! + +module Main where + +import Exception +import Chan + +main = do + chan <- newChan + ch <- dupChan chan + writeChan chan "done" + x <- readChan chan + y <- readChan ch + print ("Got "++x ++" "++y) + diff --git a/ghc/tests/concurrent/should_run/conc025.stdout b/ghc/tests/concurrent/should_run/conc025.stdout new file mode 100644 index 0000000..e69de29 -- 1.7.10.4