Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/b5ee0364f43361c94d4151323ea3a9febaf5de15

>---------------------------------------------------------------

commit b5ee0364f43361c94d4151323ea3a9febaf5de15
Author: Ian Lynagh <[email protected]>
Date:   Sun Nov 20 14:55:44 2011 +0000

    Fix and enable posix014

>---------------------------------------------------------------

 tests/lib/libposix/all.T           |    1 +
 tests/lib/libposix/posix014.hs     |   24 +++++++++---------------
 tests/lib/libposix/posix014.stdout |    1 +
 3 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/tests/lib/libposix/all.T b/tests/lib/libposix/all.T
index 9ac1692..b925a9d 100644
--- a/tests/lib/libposix/all.T
+++ b/tests/lib/libposix/all.T
@@ -5,3 +5,4 @@ test('posix005', [reqlib('unix'), expect_broken(5648)], 
compile_and_run, [''])
 test('posix006', reqlib('unix'), compile_and_run, [''])
 test('posix009', reqlib('unix'), compile_and_run, [''])
 test('posix010', reqlib('unix'), compile_and_run, [''])
+test('posix014', reqlib('unix'), compile_and_run, [''])
diff --git a/tests/lib/libposix/posix014.hs b/tests/lib/libposix/posix014.hs
index bb3518c..9d844b2 100644
--- a/tests/lib/libposix/posix014.hs
+++ b/tests/lib/libposix/posix014.hs
@@ -1,19 +1,13 @@
---!! Basic pipe usage
-module Main(main) where
+-- !! Basic pipe usage
+module Main (main) where
 
-import Posix
+import System.Posix
 
 main = do
-  str <- getEffectiveUserName
-  putStrLn str
   (rd, wd) <- createPipe
-  n <- forkProcess
-  case n of
-    Nothing  -> do
-       (str,_) <- fdRead rd 32
-       -- avoid them zombies
-       putStrLn str
-    Just pid -> do
-       fdWrite wd "Hi, there - forked child calling" 
---       getProcessStatus False True pid
-       return ()
+  pid <- forkProcess $ do (str, _) <- fdRead rd 32
+                          putStrLn str
+  fdWrite wd "Hi, there - forked child calling"
+  getProcessStatus True False pid
+  return ()
+
diff --git a/tests/lib/libposix/posix014.stdout 
b/tests/lib/libposix/posix014.stdout
new file mode 100644
index 0000000..cab0a57
--- /dev/null
+++ b/tests/lib/libposix/posix014.stdout
@@ -0,0 +1 @@
+Hi, there - forked child calling



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to