aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/libposix/posix005.hs
blob: 9ca569ccccb12f76734386c952df679c0a7f722c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

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