Add tests for _binary_exists

pull/1685/head
Noah Gorny 2020-10-21 11:02:55 +03:00
parent 8a36f21ca1
commit 3838f12498
1 changed files with 20 additions and 0 deletions

View File

@ -39,6 +39,26 @@ function local_setup {
assert_failure
}
@test "helpers: _binary_exists function exists" {
run type -a _binary_exists &> /dev/null
assert_success
}
@test "helpers: _binary_exists function positive test ls" {
run _binary_exists ls
assert_success
}
@test "helpers: _binary_exists function negative test function" {
run _binary_exists _binary_exists
assert_failure
}
@test "helpers: _binary_exists function negative test" {
run _binary_exists __addfkds_dfdsjdf
assert_failure
}
@test "helpers: bash-it help aliases ag" {
run bash-it help aliases "ag"
assert_line -n 0 "ag='ag --smart-case --pager=\"less -MIRFX'"