[project @ 2001-01-26 09:58:05 by simonpj]
authorsimonpj <unknown>
Fri, 26 Jan 2001 09:58:05 +0000 (09:58 +0000)
committersimonpj <unknown>
Fri, 26 Jan 2001 09:58:05 +0000 (09:58 +0000)
Add dupChan test

ghc/tests/concurrent/should_run/conc025.hs [new file with mode: 0644]
ghc/tests/concurrent/should_run/conc025.stdout [new file with mode: 0644]

diff --git a/ghc/tests/concurrent/should_run/conc025.hs b/ghc/tests/concurrent/should_run/conc025.hs
new file mode 100644 (file)
index 0000000..2ff5e93
--- /dev/null
@@ -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 (file)
index 0000000..e69de29