Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/67d180346b8966846b950d2cbc61af820e6080d3 >--------------------------------------------------------------- commit 67d180346b8966846b950d2cbc61af820e6080d3 Author: Ian Lynagh <[email protected]> Date: Sat Nov 19 23:43:32 2011 +0000 Move lib/System tests to base/tests >--------------------------------------------------------------- tests/lib/System/Makefile | 3 --- tests/lib/System/all.T | 8 -------- tests/lib/System/exitWith001.hs | 3 --- tests/lib/System/getArgs001.hs | 9 --------- tests/lib/System/getArgs001.stdout | 1 - tests/lib/System/getEnv001.hs | 15 --------------- tests/lib/System/getEnv001.stdout | 2 -- tests/lib/System/system001.hs | 14 -------------- tests/lib/System/system001.stdout | 14 -------------- 9 files changed, 0 insertions(+), 69 deletions(-) diff --git a/tests/lib/System/Makefile b/tests/lib/System/Makefile deleted file mode 100644 index 9101fbd..0000000 --- a/tests/lib/System/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -TOP=../../.. -include $(TOP)/mk/boilerplate.mk -include $(TOP)/mk/test.mk diff --git a/tests/lib/System/all.T b/tests/lib/System/all.T deleted file mode 100644 index 996946f..0000000 --- a/tests/lib/System/all.T +++ /dev/null @@ -1,8 +0,0 @@ - -test('exitWith001', exit_code(42), compile_and_run, ['']) -test('getArgs001', normal, compile_and_run, ['']) -test('getEnv001', normal, compile_and_run, ['']) - -test('system001', if_platform("i386-unknown-mingw32", expect_fail), \ - compile_and_run, ['']) - diff --git a/tests/lib/System/exitWith001.hs b/tests/lib/System/exitWith001.hs deleted file mode 100644 index 38dc38a..0000000 --- a/tests/lib/System/exitWith001.hs +++ /dev/null @@ -1,3 +0,0 @@ -import System.Exit (exitWith, ExitCode(..)) - -main = exitWith (ExitFailure 42) diff --git a/tests/lib/System/exitWith001.stdout b/tests/lib/System/exitWith001.stdout deleted file mode 100644 index e69de29..0000000 diff --git a/tests/lib/System/getArgs001.hs b/tests/lib/System/getArgs001.hs deleted file mode 100644 index 4b8df91..0000000 --- a/tests/lib/System/getArgs001.hs +++ /dev/null @@ -1,9 +0,0 @@ -import System.Environment (getProgName, getArgs) - -main = - getProgName >>= \ argv0 -> - putStr argv0 >> - getArgs >>= \ argv -> - sequence (map (\ x -> putChar ' ' >> putStr x) argv) >> - putChar '\n' - diff --git a/tests/lib/System/getArgs001.stdout b/tests/lib/System/getArgs001.stdout deleted file mode 100644 index e732087..0000000 --- a/tests/lib/System/getArgs001.stdout +++ /dev/null @@ -1 +0,0 @@ -getArgs001 diff --git a/tests/lib/System/getEnv001.hs b/tests/lib/System/getEnv001.hs deleted file mode 100644 index 745f8ea..0000000 --- a/tests/lib/System/getEnv001.hs +++ /dev/null @@ -1,15 +0,0 @@ - -import System.Environment (getEnv) -import System.IO.Error (catchIOError, isDoesNotExistError) - -main :: IO () -main = do - term <- getEnv "PATH" - putStrLn "Got $PATH" - fish <- getEnv "One fish, two fish, red fish, blue fish" `catchIOError` getEnv_except - putStrLn fish - -getEnv_except :: IOError -> IO String -getEnv_except ioe - | isDoesNotExistError ioe = return "" - | otherwise = ioError ioe diff --git a/tests/lib/System/getEnv001.stdout b/tests/lib/System/getEnv001.stdout deleted file mode 100644 index b191cc3..0000000 --- a/tests/lib/System/getEnv001.stdout +++ /dev/null @@ -1,2 +0,0 @@ -Got $PATH - diff --git a/tests/lib/System/system001.hs b/tests/lib/System/system001.hs deleted file mode 100644 index 4237d52..0000000 --- a/tests/lib/System/system001.hs +++ /dev/null @@ -1,14 +0,0 @@ --- Not run on mingw, because of /dev/null use - -import System.Cmd (system) -import System.Exit (ExitCode(..), exitWith) - -main = - system "cat dog 1>/dev/null 2>&1" >>= \ ec -> - case ec of - ExitSuccess -> putStr "What?!?\n" >> ioError (userError "dog succeeded") - ExitFailure _ -> - system "cat system001.hs 2>/dev/null" >>= \ ec -> - case ec of - ExitSuccess -> exitWith ExitSuccess - ExitFailure _ -> putStr "What?!?\n" >> ioError (userError "cat failed") diff --git a/tests/lib/System/system001.stdout b/tests/lib/System/system001.stdout deleted file mode 100644 index 4237d52..0000000 --- a/tests/lib/System/system001.stdout +++ /dev/null @@ -1,14 +0,0 @@ --- Not run on mingw, because of /dev/null use - -import System.Cmd (system) -import System.Exit (ExitCode(..), exitWith) - -main = - system "cat dog 1>/dev/null 2>&1" >>= \ ec -> - case ec of - ExitSuccess -> putStr "What?!?\n" >> ioError (userError "dog succeeded") - ExitFailure _ -> - system "cat system001.hs 2>/dev/null" >>= \ ec -> - case ec of - ExitSuccess -> exitWith ExitSuccess - ExitFailure _ -> putStr "What?!?\n" >> ioError (userError "cat failed") _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
