[commit: process] master: Fix process004 following the error improvements (a079a25)

Ian Lynagh igloo at earth.li
Sun Jun 2 23:22:40 CEST 2013


Repository : ssh://darcs.haskell.org//srv/darcs/packages/process

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/a079a257ba1ea5f9665620fe3a74fbf6e4c53f87

>---------------------------------------------------------------

commit a079a257ba1ea5f9665620fe3a74fbf6e4c53f87
Author: Ian Lynagh <ian at well-typed.com>
Date:   Sun Jun 2 21:10:18 2013 +0100

    Fix process004 following the error improvements

>---------------------------------------------------------------

 tests/process004.hs     |   11 ++++++++++-
 tests/process004.stdout |    4 ++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/tests/process004.hs b/tests/process004.hs
index 2b607f8..d72dc6d 100644
--- a/tests/process004.hs
+++ b/tests/process004.hs
@@ -1,14 +1,23 @@
 module Main where
 
+import System.IO.Error
 import System.Process
 
-main = do
+main :: IO ()
+main = do test1 `catchIOError` \e -> putStrLn ("Exc: " ++ show e)
+          test2 `catchIOError` \e -> putStrLn ("Exc: " ++ show e)
+
+test1 :: IO ()
+test1 = do
   (_, _, _, commhand) <-
       runInteractiveProcess "true" [] (Just "/no/such/dir") Nothing
   exitCode <- waitForProcess commhand
   print exitCode
 
+test2 :: IO ()
+test2 = do
   commhand <- runProcess "true" [] (Just "/no/such/dir") Nothing
                 Nothing Nothing Nothing
   exitCode <- waitForProcess commhand
   print exitCode
+
diff --git a/tests/process004.stdout b/tests/process004.stdout
index 46d0bc5..e6ca8c4 100644
--- a/tests/process004.stdout
+++ b/tests/process004.stdout
@@ -1,2 +1,2 @@
-ExitFailure 126
-ExitFailure 126
+Exc: true: runInteractiveProcess: runInteractiveProcess: chdir: does not exist (No such file or directory)
+Exc: true: runProcess: runInteractiveProcess: chdir: does not exist (No such file or directory)





More information about the ghc-commits mailing list