[commit: packages/process] master: Slightly more robust tests (55b61d6)

git at git.haskell.org git at git.haskell.org
Wed Jul 19 21:17:29 UTC 2017


Repository : ssh://git@git.haskell.org/process

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/55b61d6f60822fa68b659de04c360ce0d1b41186/process

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

commit 55b61d6f60822fa68b659de04c360ce0d1b41186
Author: Michael Snoyman <michael at snoyman.com>
Date:   Sun Nov 13 14:17:25 2016 +0200

    Slightly more robust tests
    
    Signed-off-by: Michael Snoyman <michael at snoyman.com>


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

55b61d6f60822fa68b659de04c360ce0d1b41186
 test/main.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/main.hs b/test/main.hs
index 3bc6d8c..9ea0524 100644
--- a/test/main.hs
+++ b/test/main.hs
@@ -38,11 +38,11 @@ main = do
 
     withCurrentDirectory "exes" $ do
       res1 <- readCreateProcess (proc "./echo.bat" []) ""
-      unless ("parent" `isInfixOf` res1) $ error $
+      unless ("parent" `isInfixOf` res1 && not ("child" `isInfixOf` res1)) $ error $
         "echo.bat with cwd failed: " ++ show res1
 
       res2 <- readCreateProcess (proc "./echo.bat" []) { cwd = Just "subdir" } ""
-      unless ("child" `isInfixOf` res2) $ error $
+      unless ("child" `isInfixOf` res2 && not ("parent" `isInfixOf` res2)) $ error $
         "echo.bat with cwd failed: " ++ show res2
 
     putStrLn "Binary handles"



More information about the ghc-commits mailing list