From 0da4659782e6aa6038779d0a78b8c535bc922652 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 12 Oct 2020 11:58:34 -0400 Subject: [PATCH] test: exit 1 on failure --- test.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test.hs b/test.hs index 5e7c7c3..f39cbc2 100644 --- a/test.hs +++ b/test.hs @@ -20,6 +20,7 @@ import qualified Network.Wreq as Wreq import qualified Network.Wreq.Session as Session import qualified Numeric import qualified System.Environment as Env +import qualified System.Exit as Exit import qualified System.Random as Random import Urbit.Airlock @@ -79,9 +80,9 @@ testing description f = (putStrLn $ replicate 80 '-') >> try f >>= \case Left (err :: SomeException) -> do Text.IO.putStrLn $ "FAIL: " <> description - putStrLn $ show err + Exit.die $ show err Right False -> do Text.IO.putStrLn $ "FAIL: " <> description - putStrLn $ "expected True, got False" + Exit.die "expected True, got False" Right True -> Text.IO.putStrLn $ "PASS: " <> description