summaryrefslogtreecommitdiff
path: root/testsuite/tests/lib
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-11-20 14:55:44 +0000
committerIan Lynagh <igloo@earth.li>2011-11-20 14:55:44 +0000
commite72ea1f2af65107b120c81756fa123546437b76e (patch)
treeafba510a590e98cb63978696b2d0185aa3ff9ae6 /testsuite/tests/lib
parent93b9ede0840cd458f45492e5a381968d2b684b10 (diff)
downloadhaskell-e72ea1f2af65107b120c81756fa123546437b76e.tar.gz
Fix and enable posix014
Diffstat (limited to 'testsuite/tests/lib')
-rw-r--r--testsuite/tests/lib/libposix/all.T1
-rw-r--r--testsuite/tests/lib/libposix/posix014.hs24
-rw-r--r--testsuite/tests/lib/libposix/posix014.stdout1
3 files changed, 11 insertions, 15 deletions
diff --git a/testsuite/tests/lib/libposix/all.T b/testsuite/tests/lib/libposix/all.T
index 9ac16925b4..b925a9dabd 100644
--- a/testsuite/tests/lib/libposix/all.T
+++ b/testsuite/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/testsuite/tests/lib/libposix/posix014.hs b/testsuite/tests/lib/libposix/posix014.hs
index bb3518c440..9d844b20ce 100644
--- a/testsuite/tests/lib/libposix/posix014.hs
+++ b/testsuite/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/testsuite/tests/lib/libposix/posix014.stdout b/testsuite/tests/lib/libposix/posix014.stdout
new file mode 100644
index 0000000000..cab0a57734
--- /dev/null
+++ b/testsuite/tests/lib/libposix/posix014.stdout
@@ -0,0 +1 @@
+Hi, there - forked child calling