mirror of
https://github.com/kdabir/has.git
synced 2024-11-11 14:40:48 +01:00
19 lines
432 B
Bash
19 lines
432 B
Bash
#!/usr/bin/env bats
|
|
|
|
@test "works with single command check" {
|
|
result=$(bash has git)
|
|
|
|
[[ $result == *"✔ git"* ]]
|
|
}
|
|
|
|
@test "safely tells about tools not configured" {
|
|
result=$(bash has something-missing)
|
|
|
|
[[ $result == *"✘ something-missing not understood"* ]]
|
|
}
|
|
|
|
@test "env lets override safety check" {
|
|
result=$(HAS_ALLOW_UNSAFE=y bash has something-missing)
|
|
|
|
[[ $result == *"✘ something-missing"* ]]
|
|
}
|