Copied command_exists function to the helpers lib so that there is no hidden dependency on the base plugin
The original command_exists function will stay in the base plugin, but will no longer be used by other plugins or themes.
This commit is contained in:
@@ -30,6 +30,26 @@ function local_setup {
|
||||
# TODO Create global __get_base_name function
|
||||
# TODO Create global __get_enabled_name function
|
||||
|
||||
@test "helpers: _command_exists function exists" {
|
||||
type -a _command_exists &> /dev/null
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "helpers: _command_exists function positive test ls" {
|
||||
run _command_exists ls
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "helpers: _command_exists function positive test bash-it" {
|
||||
run _command_exists bash-it
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "helpers: _command_exists function negative test" {
|
||||
run _command_exists __addfkds_dfdsjdf
|
||||
assert_failure
|
||||
}
|
||||
|
||||
@test "helpers: bash-it help aliases ag" {
|
||||
run bash-it help aliases "ag"
|
||||
assert_line "0" "ag='ag --smart-case --pager=\"less -MIRFX'"
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
|
||||
load ../test_helper
|
||||
load ../../lib/composure
|
||||
load ../../plugins/available/base.plugin
|
||||
|
||||
cite _about _param _example _group _author _version
|
||||
|
||||
load ../../lib/helpers
|
||||
load ../../themes/base.theme
|
||||
|
||||
@test 'themes base: battery_percentage should not exist' {
|
||||
|
||||
Reference in New Issue
Block a user