Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Give more info when unregister fails in a test

  • Loading branch information...
commit 363165b58a9b719d7d0dee128ef64dafdb344e0d 1 parent c812e17
@tibbe tibbe authored
Showing with 4 additions and 5 deletions.
  1. +4 −5 Cabal/tests/PackageTests/PackageTester.hs
View
9 Cabal/tests/PackageTests/PackageTester.hs
@@ -173,11 +173,10 @@ run cwd cmd args = do
suckH (c:output) h
requireSuccess :: (String, ExitCode, String) -> IO ()
-requireSuccess (cmd, exitCode, output) = do
- case exitCode of
- ExitSuccess -> return ()
- ExitFailure r -> do
- ioError $ userError $ "Command " ++ cmd ++ " failed."
+requireSuccess (cmd, exitCode, output) =
+ unless (exitCode == ExitSuccess) $
+ assertFailure $ "Command " ++ cmd ++ " failed.\n" ++
+ "output: " ++ output
record :: PackageSpec -> Result -> IO ()
record spec res = do
Please sign in to comment.
Something went wrong with that request. Please try again.