Copy tests from GHC testsuite (#1161)
[packages/unix.git] / tests / libposix / posix005.hs
1
2 import System.IO
3 import System.Posix.Env
4
5 main = do
6 hSetBuffering stdout NoBuffering
7 term <- getEnvVar "TERM"
8 putStrLn term
9 setEnvironment [("one","1"),("two","2")]
10 getEnvironment >>= print
11 setEnv "foo" "bar" True
12 getEnvironment >>= print
13 setEnv "foo" "baz" True
14 getEnvironment >>= print
15 setEnv "fu" "bar" True
16 getEnvironment >>= print
17 unsetEnv "foo"
18 getEnvironment >>= print
19 setEnvironment []
20 getEnvironment >>= print
21