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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/183dc5d46ab17d56812a420f14f5c6e49623dcaa

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

commit 183dc5d46ab17d56812a420f14f5c6e49623dcaa
Author: Ian Lynagh <[email protected]>
Date:   Sun Nov 20 13:08:37 2011 +0000

    Mostly fix posix005. Complete fix blocked on #5648.

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

 tests/lib/libposix/all.T       |    1 +
 tests/lib/libposix/posix005.hs |   44 ++++++++++++++++++---------------------
 2 files changed, 21 insertions(+), 24 deletions(-)

diff --git a/tests/lib/libposix/all.T b/tests/lib/libposix/all.T
index 49d25d8..7cd243c 100644
--- a/tests/lib/libposix/all.T
+++ b/tests/lib/libposix/all.T
@@ -1,3 +1,4 @@
 test('posix002', reqlib('unix'), compile_and_run, [''])
 test('posix003', normal,         compile_and_run, [''])
 test('posix004', reqlib('unix'), compile_and_run, [''])
+test('posix005', [reqlib('unix'), expect_broken(5648)], compile_and_run, [''])
diff --git a/tests/lib/libposix/posix005.hs b/tests/lib/libposix/posix005.hs
index a531829..9ca569c 100644
--- a/tests/lib/libposix/posix005.hs
+++ b/tests/lib/libposix/posix005.hs
@@ -1,25 +1,21 @@
-import Posix
-import IO
-main =
-    hSetBuffering stdout NoBuffering >>
-    getEnvVar "TERM" >>= \ term ->
-    putStrLn term >>
-    setEnvironment [("one","1"),("two","2")] >>
-    getEnvironment >>= \ env ->
-    print env >>
-    setEnvVar "foo" "bar" >>
-    getEnvironment >>= \ env ->
-    print env >>
-    setEnvVar "foo" "baz" >>
-    getEnvironment >>= \ env ->
-    print env >>
-    setEnvVar "fu" "bar" >>
-    getEnvironment >>= \ env ->
-    print env >>
-    removeEnvVar "foo" >>
-    getEnvironment >>= \ env ->
-    print env >>
-    setEnvironment [] >>
-    getEnvironment >>= \ env ->
-    print env
+
+import System.IO
+import System.Posix.Env
+
+main = do
+    hSetBuffering stdout NoBuffering
+    term <- getEnvVar "TERM"
+    putStrLn term
+    setEnvironment [("one","1"),("two","2")]
+    getEnvironment >>= print
+    setEnv "foo" "bar" True
+    getEnvironment >>= print
+    setEnv "foo" "baz" True
+    getEnvironment >>= print
+    setEnv "fu" "bar" True
+    getEnvironment >>= print
+    unsetEnv "foo"
+    getEnvironment >>= print
+    setEnvironment []
+    getEnvironment >>= print
 



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

Reply via email to