Move lib/System tests to base/tests
authorIan Lynagh <igloo@earth.li>
Sat, 19 Nov 2011 23:43:32 +0000 (23:43 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 19 Nov 2011 23:43:32 +0000 (23:43 +0000)
testsuite/tests/lib/System/Makefile [deleted file]
testsuite/tests/lib/System/all.T [deleted file]
testsuite/tests/lib/System/exitWith001.hs [deleted file]
testsuite/tests/lib/System/exitWith001.stdout [deleted file]
testsuite/tests/lib/System/getArgs001.hs [deleted file]
testsuite/tests/lib/System/getArgs001.stdout [deleted file]
testsuite/tests/lib/System/getEnv001.hs [deleted file]
testsuite/tests/lib/System/getEnv001.stdout [deleted file]
testsuite/tests/lib/System/system001.hs [deleted file]
testsuite/tests/lib/System/system001.stdout [deleted file]

diff --git a/testsuite/tests/lib/System/Makefile b/testsuite/tests/lib/System/Makefile
deleted file mode 100644 (file)
index 9101fbd..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-TOP=../../..
-include $(TOP)/mk/boilerplate.mk
-include $(TOP)/mk/test.mk
diff --git a/testsuite/tests/lib/System/all.T b/testsuite/tests/lib/System/all.T
deleted file mode 100644 (file)
index 996946f..0000000
+++ /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/testsuite/tests/lib/System/exitWith001.hs b/testsuite/tests/lib/System/exitWith001.hs
deleted file mode 100644 (file)
index 38dc38a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-import System.Exit (exitWith, ExitCode(..))
-
-main = exitWith (ExitFailure 42)
diff --git a/testsuite/tests/lib/System/exitWith001.stdout b/testsuite/tests/lib/System/exitWith001.stdout
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/testsuite/tests/lib/System/getArgs001.hs b/testsuite/tests/lib/System/getArgs001.hs
deleted file mode 100644 (file)
index 4b8df91..0000000
+++ /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/testsuite/tests/lib/System/getArgs001.stdout b/testsuite/tests/lib/System/getArgs001.stdout
deleted file mode 100644 (file)
index e732087..0000000
+++ /dev/null
@@ -1 +0,0 @@
-getArgs001
diff --git a/testsuite/tests/lib/System/getEnv001.hs b/testsuite/tests/lib/System/getEnv001.hs
deleted file mode 100644 (file)
index 745f8ea..0000000
+++ /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/testsuite/tests/lib/System/getEnv001.stdout b/testsuite/tests/lib/System/getEnv001.stdout
deleted file mode 100644 (file)
index b191cc3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Got $PATH
-
diff --git a/testsuite/tests/lib/System/system001.hs b/testsuite/tests/lib/System/system001.hs
deleted file mode 100644 (file)
index 4237d52..0000000
+++ /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/testsuite/tests/lib/System/system001.stdout b/testsuite/tests/lib/System/system001.stdout
deleted file mode 100644 (file)
index 4237d52..0000000
+++ /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")