Repository : ssh://darcs.haskell.org//srv/darcs/packages/base On branch : master
http://hackage.haskell.org/trac/ghc/changeset/1ba23d872ce90ccd40f3b2ec0887bd197ad5e1c1 >--------------------------------------------------------------- commit 1ba23d872ce90ccd40f3b2ec0887bd197ad5e1c1 Author: Paolo Capriotti <[email protected]> Date: Tue Apr 10 13:40:25 2012 +0100 Add testcase for #5930. >--------------------------------------------------------------- tests/System/T5930.hs | 10 ++++++++++ tests/System/T5930.stdout | 2 ++ tests/System/all.T | 1 + 3 files changed, 13 insertions(+), 0 deletions(-) diff --git a/tests/System/T5930.hs b/tests/System/T5930.hs new file mode 100644 index 0000000..a46054f --- /dev/null +++ b/tests/System/T5930.hs @@ -0,0 +1,10 @@ +import Control.Monad (when) +import Data.Maybe (isJust) +import System.Environment (lookupEnv) + +main :: IO () +main = do + term <- lookupEnv "PATH" + when (isJust term) $ putStrLn "Got PATH" + fish <- lookupEnv "One fish, two fish, red fish, blue fish" + print fish diff --git a/tests/System/T5930.stdout b/tests/System/T5930.stdout new file mode 100644 index 0000000..0ee0b42 --- /dev/null +++ b/tests/System/T5930.stdout @@ -0,0 +1,2 @@ +Got PATH +Nothing diff --git a/tests/System/all.T b/tests/System/all.T index 996946f..595ba5c 100644 --- a/tests/System/all.T +++ b/tests/System/all.T @@ -2,6 +2,7 @@ test('exitWith001', exit_code(42), compile_and_run, ['']) test('getArgs001', normal, compile_and_run, ['']) test('getEnv001', normal, compile_and_run, ['']) +test('T5930', normal, compile_and_run, ['']) test('system001', if_platform("i386-unknown-mingw32", expect_fail), \ compile_and_run, ['']) _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
