From 43caa970a14d7abcd5d4b9bc93678858a9cea920 Mon Sep 17 00:00:00 2001 From: Kunal Dabir Date: Tue, 29 Aug 2017 09:18:13 +0530 Subject: [PATCH] add test for status code > 1 --- .hastest.bats | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.hastest.bats b/.hastest.bats index dcd9b91..9d03f39 100644 --- a/.hastest.bats +++ b/.hastest.bats @@ -20,3 +20,11 @@ [ "$status" -eq 1 ] [[ $output == *"✘ something-missing"* ]] } + +@test "status code reflect number of failed commands" { + HAS_ALLOW_UNSAFE=y run bash has something-missing make git foobar + + [ "$status" -eq 2 ] + [[ $output == *"✘ something-missing"* ]] + [[ $output == *"✘ foobar"* ]] +}