From 5ee7433f9fbe1cf1ea825eaf5943edff0f9bd7b3 Mon Sep 17 00:00:00 2001
From: Paolo Capriotti
Date: Fri, 30 Mar 2012 19:23:29 +0100
Subject: Re-enable posix005 test (#5648)
---
tests/libposix/all.T | 2 +-
tests/libposix/posix005.hs | 6 +++---
tests/libposix/posix005.stdout | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
(limited to 'tests')
diff --git a/tests/libposix/all.T b/tests/libposix/all.T
index a266040..3fb52ec 100644
--- a/tests/libposix/all.T
+++ b/tests/libposix/all.T
@@ -6,7 +6,7 @@ test('posix003', if_os('mingw32', skip), compile_and_run, [''])
test('posix004', [ reqlib('unix') ], compile_and_run, [''])
-test('posix005', [reqlib('unix'), expect_broken(5648)], compile_and_run, [''])
+test('posix005', [reqlib('unix') ], compile_and_run, [''])
test('posix006', reqlib('unix'), compile_and_run, [''])
test('posix009', [ omit_ways(threaded_ways), reqlib('unix') ], compile_and_run, [''])
diff --git a/tests/libposix/posix005.hs b/tests/libposix/posix005.hs
index 9ca569c..4365eb5 100644
--- a/tests/libposix/posix005.hs
+++ b/tests/libposix/posix005.hs
@@ -4,8 +4,8 @@ import System.Posix.Env
main = do
hSetBuffering stdout NoBuffering
- term <- getEnvVar "TERM"
- putStrLn term
+ term <- getEnv "TERM"
+ maybe (return ()) putStrLn term
setEnvironment [("one","1"),("two","2")]
getEnvironment >>= print
setEnv "foo" "bar" True
@@ -16,6 +16,6 @@ main = do
getEnvironment >>= print
unsetEnv "foo"
getEnvironment >>= print
- setEnvironment []
+ clearEnv
getEnvironment >>= print
diff --git a/tests/libposix/posix005.stdout b/tests/libposix/posix005.stdout
index 9896f43..ace79ee 100644
--- a/tests/libposix/posix005.stdout
+++ b/tests/libposix/posix005.stdout
@@ -1,4 +1,4 @@
-emacs
+vt100
[("one","1"),("two","2")]
[("one","1"),("two","2"),("foo","bar")]
[("one","1"),("two","2"),("foo","baz")]
--
cgit v1.2.3