diff options
Diffstat (limited to 'testsuite/tests/lib/libposix/posix005.hs')
-rw-r--r-- | testsuite/tests/lib/libposix/posix005.hs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/tests/lib/libposix/posix005.hs b/testsuite/tests/lib/libposix/posix005.hs new file mode 100644 index 0000000000..a53182971a --- /dev/null +++ b/testsuite/tests/lib/libposix/posix005.hs @@ -0,0 +1,25 @@ +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 + |