Started work on bash-it help aliases
This commit is contained in:
@@ -31,16 +31,36 @@ function local_setup {
|
||||
# TODO Create global __get_enabled_name function
|
||||
|
||||
@test "helpers: bash-it help aliases ag" {
|
||||
run bash-it help alias "ag"
|
||||
run bash-it help aliases "ag"
|
||||
assert_line "0" "ag='ag --smart-case --pager=\"less -MIRFX'"
|
||||
}
|
||||
|
||||
@test "helpers: bash-it help aliases without any aliases enabled" {
|
||||
run bash-it help alias
|
||||
echo "${lines[@]}"
|
||||
run bash-it help aliases
|
||||
assert_line "0" ""
|
||||
}
|
||||
|
||||
@test "helpers: bash-it help aliases one alias enabled in the old directory" {
|
||||
ln -s $BASH_IT/aliases/available/ag.aliases.bash $BASH_IT/aliases/enabled/150---ag.aliases.bash
|
||||
assert [ -L "$BASH_IT/aliases/enabled/150---ag.aliases.bash" ]
|
||||
|
||||
run bash-it help aliases
|
||||
|
||||
echo "${lines[@]}"
|
||||
assert_line "0" "ag:"
|
||||
}
|
||||
|
||||
@test "helpers: bash-it help aliases one alias enabled" {
|
||||
run bash-it enable alias "ag"
|
||||
assert_line "0" 'ag enabled with priority 150.'
|
||||
assert [ -L "$BASH_IT/enabled/150---ag.aliases.bash" ]
|
||||
|
||||
run bash-it help aliases
|
||||
|
||||
echo "${lines[@]}"
|
||||
assert_line "2" "foo"
|
||||
}
|
||||
|
||||
@test "helpers: enable the todo.txt-cli aliases through the bash-it function" {
|
||||
run bash-it enable alias "todo.txt-cli"
|
||||
assert_line "0" 'todo.txt-cli enabled with priority 150.'
|
||||
|
||||
Reference in New Issue
Block a user