mirror of
https://github.com/kdabir/has.git
synced 2024-11-10 21:26:50 +01:00
udpate test names and tool names
This commit is contained in:
parent
43caa970a1
commit
e206cbfa21
@ -8,23 +8,23 @@
|
||||
}
|
||||
|
||||
@test "safely tells about tools not configured" {
|
||||
run bash has something-missing
|
||||
run bash has foobar
|
||||
|
||||
[ "$status" -eq 1 ]
|
||||
[[ $output == *"✘ something-missing not understood"* ]]
|
||||
[[ $output == *"✘ foobar not understood"* ]]
|
||||
}
|
||||
|
||||
@test "env var lets override safety check" {
|
||||
HAS_ALLOW_UNSAFE=y run bash has something-missing
|
||||
HAS_ALLOW_UNSAFE=y run bash has foobar
|
||||
|
||||
[ "$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"* ]]
|
||||
}
|
||||
|
||||
@test "status code reflects number of failed commands" {
|
||||
HAS_ALLOW_UNSAFE=y run bash has foobar make git barbaz
|
||||
|
||||
[ "$status" -eq 2 ]
|
||||
[[ $output == *"✘ foobar"* ]]
|
||||
[[ $output == *"✘ barbaz"* ]]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user