Skip to content
Snippets Groups Projects
Commit 8fd52251 authored by Francesco Gazzetta's avatar Francesco Gazzetta
Browse files

Add assert for exit code

parent 7f7cb931
No related branches found
No related tags found
No related merge requests found
......@@ -602,6 +602,14 @@ getMarkedOutput out = unlines (go (lines out) False)
assertFailure :: WithCallStack (String -> m ())
assertFailure msg = withFrozenCallStack $ error msg
assertExitCode :: MonadIO m => WithCallStack (ExitCode -> Result -> m ())
assertExitCode code result =
when (code /= resultExitCode result) $
assertFailure $ "Expected exit code: "
++ show code
++ "\nActual: "
++ show (resultExitCode result)
assertEqual :: (Eq a, Show a, MonadIO m) => WithCallStack (String -> a -> a -> m ())
assertEqual s x y =
withFrozenCallStack $
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment