2
1
mirror of https://github.com/kdabir/has.git synced 2024-11-10 21:26:50 +01:00

add test for status code > 1

This commit is contained in:
Kunal Dabir 2017-08-29 09:18:13 +05:30
parent 3b6dbf78e4
commit 43caa970a1

View File

@ -20,3 +20,11 @@
[ "$status" -eq 1 ] [ "$status" -eq 1 ]
[[ $output == *"✘ something-missing"* ]] [[ $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"* ]]
}