diff --git a/lib/helpers.bash b/lib/helpers.bash index 0ff56af132..2f567a3245 100644 --- a/lib/helpers.bash +++ b/lib/helpers.bash @@ -3,7 +3,7 @@ # # A collection of reusable functions. -: "${BASH_IT_LOAD_PRIORITY_ALIAS:=150}" +: "${BASH_IT_LOAD_PRIORITY_ALIAS:=750}" : "${BASH_IT_LOAD_PRIORITY_PLUGIN:=250}" : "${BASH_IT_LOAD_PRIORITY_COMPLETION:=350}" BASH_IT_LOAD_PRIORITY_SEPARATOR="---" diff --git a/test/bash_it/bash_it.bats b/test/bash_it/bash_it.bats index 13c842381b..2bea221458 100644 --- a/test/bash_it/bash_it.bats +++ b/test/bash_it/bash_it.bats @@ -28,10 +28,10 @@ function local_setup { ln -s $BASH_IT/plugins/available/base.plugin.bash $BASH_IT/plugins/enabled/250---base.plugin.bash assert_link_exist "$BASH_IT/plugins/enabled/250---base.plugin.bash" - ln -s $BASH_IT/aliases/available/a.aliases.bash $BASH_IT/aliases/enabled/150---a.aliases.bash - assert_link_exist "$BASH_IT/aliases/enabled/150---a.aliases.bash" - ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/aliases/enabled/150---b.aliases.bash - assert_link_exist "$BASH_IT/aliases/enabled/150---b.aliases.bash" + ln -s $BASH_IT/aliases/available/a.aliases.bash $BASH_IT/aliases/enabled/750---a.aliases.bash + assert_link_exist "$BASH_IT/aliases/enabled/750---a.aliases.bash" + ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/aliases/enabled/750---b.aliases.bash + assert_link_exist "$BASH_IT/aliases/enabled/750---b.aliases.bash" # The `test_alias` alias should not exist run alias test_alias &> /dev/null @@ -51,10 +51,10 @@ function local_setup { ln -s $BASH_IT/plugins/available/base.plugin.bash $BASH_IT/plugins/enabled/250---base.plugin.bash assert_link_exist "$BASH_IT/plugins/enabled/250---base.plugin.bash" - ln -s $BASH_IT/aliases/available/a.aliases.bash $BASH_IT/aliases/enabled/175---a.aliases.bash - assert_link_exist "$BASH_IT/aliases/enabled/175---a.aliases.bash" - ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/aliases/enabled/150---b.aliases.bash - assert_link_exist "$BASH_IT/aliases/enabled/150---b.aliases.bash" + ln -s $BASH_IT/aliases/available/a.aliases.bash $BASH_IT/aliases/enabled/755---a.aliases.bash + assert_link_exist "$BASH_IT/aliases/enabled/755---a.aliases.bash" + ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/aliases/enabled/750---b.aliases.bash + assert_link_exist "$BASH_IT/aliases/enabled/750---b.aliases.bash" # The `test_alias` alias should not exist run alias test_alias &> /dev/null @@ -74,10 +74,10 @@ function local_setup { ln -s $BASH_IT/plugins/available/base.plugin.bash $BASH_IT/plugins/enabled/250---base.plugin.bash assert_link_exist "$BASH_IT/plugins/enabled/250---base.plugin.bash" - ln -s $BASH_IT/aliases/available/a.aliases.bash $BASH_IT/aliases/enabled/150---a.aliases.bash - assert_link_exist "$BASH_IT/aliases/enabled/150---a.aliases.bash" - ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/aliases/enabled/150---b.aliases.bash - assert_link_exist "$BASH_IT/aliases/enabled/150---b.aliases.bash" + ln -s $BASH_IT/aliases/available/a.aliases.bash $BASH_IT/aliases/enabled/750---a.aliases.bash + assert_link_exist "$BASH_IT/aliases/enabled/750---a.aliases.bash" + ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/aliases/enabled/750---b.aliases.bash + assert_link_exist "$BASH_IT/aliases/enabled/750---b.aliases.bash" ln -s $BASH_IT/plugins/available/c.plugin.bash $BASH_IT/plugins/enabled/250---c.plugin.bash assert_link_exist "$BASH_IT/plugins/enabled/250---c.plugin.bash" @@ -100,8 +100,8 @@ function local_setup { ln -s $BASH_IT/plugins/available/base.plugin.bash $BASH_IT/plugins/enabled/250---base.plugin.bash assert_link_exist "$BASH_IT/plugins/enabled/250---base.plugin.bash" - ln -s $BASH_IT/aliases/available/a.aliases.bash $BASH_IT/aliases/enabled/150---a.aliases.bash - assert_link_exist "$BASH_IT/aliases/enabled/150---a.aliases.bash" + ln -s $BASH_IT/aliases/available/a.aliases.bash $BASH_IT/aliases/enabled/750---a.aliases.bash + assert_link_exist "$BASH_IT/aliases/enabled/750---a.aliases.bash" ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/completion/enabled/350---b.completion.bash assert_link_exist "$BASH_IT/completion/enabled/350---b.completion.bash" ln -s $BASH_IT/plugins/available/c.plugin.bash $BASH_IT/plugins/enabled/250---c.plugin.bash @@ -155,8 +155,8 @@ function local_setup { ln -s $BASH_IT/aliases/available/a.aliases.bash $BASH_IT/aliases/enabled/350---a.aliases.bash assert_link_exist "$BASH_IT/aliases/enabled/350---a.aliases.bash" - ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/aliases/enabled/150---b.aliases.bash - assert_link_exist "$BASH_IT/aliases/enabled/150---b.aliases.bash" + ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/aliases/enabled/750---b.aliases.bash + assert_link_exist "$BASH_IT/aliases/enabled/750---b.aliases.bash" ln -s $BASH_IT/plugins/available/c.plugin.bash $BASH_IT/plugins/enabled/250---c.plugin.bash assert_link_exist "$BASH_IT/plugins/enabled/250---c.plugin.bash" @@ -179,10 +179,10 @@ function local_setup { ln -s $BASH_IT/plugins/available/base.plugin.bash $BASH_IT/enabled/250---base.plugin.bash assert_link_exist "$BASH_IT/enabled/250---base.plugin.bash" - ln -s $BASH_IT/aliases/available/a.aliases.bash $BASH_IT/enabled/150---a.aliases.bash - assert_link_exist "$BASH_IT/enabled/150---a.aliases.bash" - ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/enabled/150---b.aliases.bash - assert_link_exist "$BASH_IT/enabled/150---b.aliases.bash" + ln -s $BASH_IT/aliases/available/a.aliases.bash $BASH_IT/enabled/750---a.aliases.bash + assert_link_exist "$BASH_IT/enabled/750---a.aliases.bash" + ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/enabled/750---b.aliases.bash + assert_link_exist "$BASH_IT/enabled/750---b.aliases.bash" # The `test_alias` alias should not exist run alias test_alias &> /dev/null @@ -201,10 +201,10 @@ function local_setup { ln -s $BASH_IT/plugins/available/base.plugin.bash $BASH_IT/enabled/250---base.plugin.bash assert_link_exist "$BASH_IT/enabled/250---base.plugin.bash" - ln -s $BASH_IT/aliases/available/a.aliases.bash $BASH_IT/enabled/175---a.aliases.bash - assert_link_exist "$BASH_IT/enabled/175---a.aliases.bash" - ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/enabled/150---b.aliases.bash - assert_link_exist "$BASH_IT/enabled/150---b.aliases.bash" + ln -s $BASH_IT/aliases/available/a.aliases.bash $BASH_IT/enabled/755---a.aliases.bash + assert_link_exist "$BASH_IT/enabled/755---a.aliases.bash" + ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/enabled/750---b.aliases.bash + assert_link_exist "$BASH_IT/enabled/750---b.aliases.bash" # The `test_alias` alias should not exist run alias test_alias &> /dev/null @@ -223,12 +223,12 @@ function local_setup { ln -s $BASH_IT/plugins/available/base.plugin.bash $BASH_IT/enabled/250---base.plugin.bash assert_link_exist "$BASH_IT/enabled/250---base.plugin.bash" - ln -s $BASH_IT/aliases/available/a.aliases.bash $BASH_IT/enabled/150---a.aliases.bash - assert_link_exist "$BASH_IT/enabled/150---a.aliases.bash" - ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/enabled/150---b.aliases.bash - assert_link_exist "$BASH_IT/enabled/150---b.aliases.bash" - ln -s $BASH_IT/plugins/available/c.plugin.bash $BASH_IT/enabled/250---c.plugin.bash - assert_link_exist "$BASH_IT/enabled/250---c.plugin.bash" + ln -s $BASH_IT/aliases/available/a.aliases.bash $BASH_IT/enabled/755---a.aliases.bash + assert_link_exist "$BASH_IT/enabled/755---a.aliases.bash" + ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/enabled/750---b.aliases.bash + assert_link_exist "$BASH_IT/enabled/750---b.aliases.bash" + ln -s $BASH_IT/plugins/available/c.plugin.bash $BASH_IT/enabled/850---c.plugin.bash + assert_link_exist "$BASH_IT/enabled/850---c.plugin.bash" # The `test_alias` alias should not exist run alias test_alias &> /dev/null @@ -247,12 +247,12 @@ function local_setup { ln -s $BASH_IT/plugins/available/base.plugin.bash $BASH_IT/enabled/250---base.plugin.bash assert_link_exist "$BASH_IT/enabled/250---base.plugin.bash" - ln -s $BASH_IT/aliases/available/a.aliases.bash $BASH_IT/enabled/350---a.aliases.bash - assert_link_exist "$BASH_IT/enabled/350---a.aliases.bash" - ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/enabled/150---b.aliases.bash - assert_link_exist "$BASH_IT/enabled/150---b.aliases.bash" - ln -s $BASH_IT/plugins/available/c.plugin.bash $BASH_IT/enabled/250---c.plugin.bash - assert_link_exist "$BASH_IT/enabled/250---c.plugin.bash" + ln -s $BASH_IT/aliases/available/a.aliases.bash $BASH_IT/enabled/950---a.aliases.bash + assert_link_exist "$BASH_IT/enabled/950---a.aliases.bash" + ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/enabled/750---b.aliases.bash + assert_link_exist "$BASH_IT/enabled/750---b.aliases.bash" + ln -s $BASH_IT/plugins/available/c.plugin.bash $BASH_IT/enabled/850---c.plugin.bash + assert_link_exist "$BASH_IT/enabled/850---c.plugin.bash" # The `test_alias` alias should not exist run alias test_alias &> /dev/null @@ -276,13 +276,13 @@ function local_setup { ln -s $BASH_IT/aliases/available/a.aliases.bash $BASH_IT/enabled/350---a.aliases.bash assert_link_exist "$BASH_IT/enabled/350---a.aliases.bash" - ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/enabled/150---b.aliases.bash - assert_link_exist "$BASH_IT/enabled/150---b.aliases.bash" + ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/enabled/750---b.aliases.bash + assert_link_exist "$BASH_IT/enabled/750---b.aliases.bash" ln -s $BASH_IT/plugins/available/c.plugin.bash $BASH_IT/enabled/250---c.plugin.bash assert_link_exist "$BASH_IT/enabled/250---c.plugin.bash" # Add one file in the old directory structure - ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/aliases/enabled/150---b.aliases.bash - assert_link_exist "$BASH_IT/aliases/enabled/150---b.aliases.bash" + ln -s $BASH_IT/aliases/available/b.aliases.bash $BASH_IT/aliases/enabled/750---b.aliases.bash + assert_link_exist "$BASH_IT/aliases/enabled/750---b.aliases.bash" # The `test_alias` alias should not exist run alias test_alias &> /dev/null @@ -299,8 +299,8 @@ function local_setup { @test "bash-it: load enabled aliases from new structure, priority-based" { mkdir -p $BASH_IT/enabled - ln -s $BASH_IT/aliases/available/atom.aliases.bash $BASH_IT/enabled/150---atom.aliases.bash - assert_link_exist "$BASH_IT/enabled/150---atom.aliases.bash" + ln -s $BASH_IT/aliases/available/atom.aliases.bash $BASH_IT/enabled/750---atom.aliases.bash + assert_link_exist "$BASH_IT/enabled/750---atom.aliases.bash" ln -s $BASH_IT/plugins/available/base.plugin.bash $BASH_IT/enabled/250---base.plugin.bash assert_link_exist "$BASH_IT/enabled/250---base.plugin.bash" @@ -317,8 +317,8 @@ function local_setup { @test "bash-it: load enabled aliases from old structure, priority-based" { mkdir -p $BASH_IT/aliases/enabled mkdir -p $BASH_IT/plugins/enabled - ln -s $BASH_IT/aliases/available/atom.aliases.bash $BASH_IT/aliases/enabled/150---atom.aliases.bash - assert_link_exist "$BASH_IT/aliases/enabled/150---atom.aliases.bash" + ln -s $BASH_IT/aliases/available/atom.aliases.bash $BASH_IT/aliases/enabled/750---atom.aliases.bash + assert_link_exist "$BASH_IT/aliases/enabled/750---atom.aliases.bash" ln -s $BASH_IT/plugins/available/base.plugin.bash $BASH_IT/plugins/enabled/250---base.plugin.bash assert_link_exist "$BASH_IT/plugins/enabled/250---base.plugin.bash" diff --git a/test/completion/bash-it.completion.bats b/test/completion/bash-it.completion.bats index f23361850e..0282cf9bd2 100755 --- a/test/completion/bash-it.completion.bats +++ b/test/completion/bash-it.completion.bats @@ -166,8 +166,8 @@ function __check_completion () { } @test "completion bash-it: disable - provide the a* aliases when atom is enabled with the old location and priority-based name" { - ln -s "$BASH_IT/aliases/available/atom.aliases.bash" "$BASH_IT/aliases/enabled/150---atom.aliases.bash" - assert_link_exist "$BASH_IT/aliases/enabled/150---atom.aliases.bash" + ln -s "$BASH_IT/aliases/available/atom.aliases.bash" "$BASH_IT/aliases/enabled/750---atom.aliases.bash" + assert_link_exist "$BASH_IT/aliases/enabled/750---atom.aliases.bash" ln -s "$BASH_IT/completion/available/apm.completion.bash" "$BASH_IT/completion/enabled/350---apm.completion.bash" assert_link_exist "$BASH_IT/completion/enabled/350---apm.completion.bash" @@ -177,8 +177,8 @@ function __check_completion () { } @test "completion bash-it: disable - provide the a* aliases when atom is enabled with the new location and priority-based name" { - ln -s "$BASH_IT/aliases/available/atom.aliases.bash" "$BASH_IT/enabled/150---atom.aliases.bash" - assert_link_exist "$BASH_IT/enabled/150---atom.aliases.bash" + ln -s "$BASH_IT/aliases/available/atom.aliases.bash" "$BASH_IT/enabled/750---atom.aliases.bash" + assert_link_exist "$BASH_IT/enabled/750---atom.aliases.bash" ln -s "$BASH_IT/completion/available/apm.completion.bash" "$BASH_IT/enabled/350---apm.completion.bash" assert_link_exist "$BASH_IT/enabled/350---apm.completion.bash" @@ -199,8 +199,8 @@ function __check_completion () { } @test "completion bash-it: disable - provide the docker-machine plugin when docker-machine is enabled with the old location and priority-based name" { - ln -s "$BASH_IT/aliases/available/docker-compose.aliases.bash" "$BASH_IT/aliases/enabled/150---docker-compose.aliases.bash" - assert_link_exist "$BASH_IT/aliases/enabled/150---docker-compose.aliases.bash" + ln -s "$BASH_IT/aliases/available/docker-compose.aliases.bash" "$BASH_IT/aliases/enabled/750---docker-compose.aliases.bash" + assert_link_exist "$BASH_IT/aliases/enabled/750---docker-compose.aliases.bash" ln -s "$BASH_IT/plugins/available/docker-machine.plugin.bash" "$BASH_IT/plugins/enabled/350---docker-machine.plugin.bash" assert_link_exist "$BASH_IT/plugins/enabled/350---docker-machine.plugin.bash" @@ -210,8 +210,8 @@ function __check_completion () { } @test "completion bash-it: disable - provide the docker-machine plugin when docker-machine is enabled with the new location and priority-based name" { - ln -s "$BASH_IT/aliases/available/docker-compose.aliases.bash" "$BASH_IT/enabled/150---docker-compose.aliases.bash" - assert_link_exist "$BASH_IT/enabled/150---docker-compose.aliases.bash" + ln -s "$BASH_IT/aliases/available/docker-compose.aliases.bash" "$BASH_IT/enabled/750---docker-compose.aliases.bash" + assert_link_exist "$BASH_IT/enabled/750---docker-compose.aliases.bash" ln -s "$BASH_IT/plugins/available/docker-machine.plugin.bash" "$BASH_IT/enabled/350---docker-machine.plugin.bash" assert_link_exist "$BASH_IT/enabled/350---docker-machine.plugin.bash" @@ -232,8 +232,8 @@ function __check_completion () { } @test "completion bash-it: disable - provide the todo.txt-cli aliases when todo plugin is enabled with the old location and priority-based name" { - ln -s "$BASH_IT/aliases/available/todo.txt-cli.aliases.bash" "$BASH_IT/aliases/enabled/150---todo.txt-cli.aliases.bash" - assert_link_exist "$BASH_IT/aliases/enabled/150---todo.txt-cli.aliases.bash" + ln -s "$BASH_IT/aliases/available/todo.txt-cli.aliases.bash" "$BASH_IT/aliases/enabled/750---todo.txt-cli.aliases.bash" + assert_link_exist "$BASH_IT/aliases/enabled/750---todo.txt-cli.aliases.bash" ln -s "$BASH_IT/plugins/available/todo.plugin.bash" "$BASH_IT/plugins/enabled/350---todo.plugin.bash" assert_link_exist "$BASH_IT/plugins/enabled/350---todo.plugin.bash" @@ -243,8 +243,8 @@ function __check_completion () { } @test "completion bash-it: disable - provide the todo.txt-cli aliases when todo plugin is enabled with the new location and priority-based name" { - ln -s "$BASH_IT/aliases/available/todo.txt-cli.aliases.bash" "$BASH_IT/enabled/150---todo.txt-cli.aliases.bash" - assert_link_exist "$BASH_IT/enabled/150---todo.txt-cli.aliases.bash" + ln -s "$BASH_IT/aliases/available/todo.txt-cli.aliases.bash" "$BASH_IT/enabled/750---todo.txt-cli.aliases.bash" + assert_link_exist "$BASH_IT/enabled/750---todo.txt-cli.aliases.bash" ln -s "$BASH_IT/plugins/available/todo.plugin.bash" "$BASH_IT/enabled/350---todo.plugin.bash" assert_link_exist "$BASH_IT/enabled/350---todo.plugin.bash" @@ -272,16 +272,16 @@ function __check_completion () { } @test "completion bash-it: enable - provide the a* aliases when atom is enabled with the old location and priority-based name" { - ln -s "$BASH_IT/aliases/available/atom.aliases.bash" "$BASH_IT/aliases/enabled/150---atom.aliases.bash" - assert_link_exist "$BASH_IT/aliases/enabled/150---atom.aliases.bash" + ln -s "$BASH_IT/aliases/available/atom.aliases.bash" "$BASH_IT/aliases/enabled/750---atom.aliases.bash" + assert_link_exist "$BASH_IT/aliases/enabled/750---atom.aliases.bash" run __check_completion 'bash-it enable alias a' assert_line -n 0 "all ag ansible apt" } @test "completion bash-it: enable - provide the a* aliases when atom is enabled with the new location and priority-based name" { - ln -s "$BASH_IT/aliases/available/atom.aliases.bash" "$BASH_IT/enabled/150---atom.aliases.bash" - assert_link_exist "$BASH_IT/enabled/150---atom.aliases.bash" + ln -s "$BASH_IT/aliases/available/atom.aliases.bash" "$BASH_IT/enabled/750---atom.aliases.bash" + assert_link_exist "$BASH_IT/enabled/750---atom.aliases.bash" run __check_completion 'bash-it enable alias a' assert_line -n 0 "all ag ansible apt" @@ -296,16 +296,16 @@ function __check_completion () { } @test "completion bash-it: enable - provide the docker-* plugins when docker-compose is enabled with the old location and priority-based name" { - ln -s "$BASH_IT/aliases/available/docker-compose.aliases.bash" "$BASH_IT/aliases/enabled/150---docker-compose.aliases.bash" - assert_link_exist "$BASH_IT/aliases/enabled/150---docker-compose.aliases.bash" + ln -s "$BASH_IT/aliases/available/docker-compose.aliases.bash" "$BASH_IT/aliases/enabled/750---docker-compose.aliases.bash" + assert_link_exist "$BASH_IT/aliases/enabled/750---docker-compose.aliases.bash" run __check_completion 'bash-it enable plugin docker' assert_line -n 0 "docker docker-compose docker-machine" } @test "completion bash-it: enable - provide the docker-* plugins when docker-compose is enabled with the new location and priority-based name" { - ln -s "$BASH_IT/aliases/available/docker-compose.aliases.bash" "$BASH_IT/enabled/150---docker-compose.aliases.bash" - assert_link_exist "$BASH_IT/enabled/150---docker-compose.aliases.bash" + ln -s "$BASH_IT/aliases/available/docker-compose.aliases.bash" "$BASH_IT/enabled/750---docker-compose.aliases.bash" + assert_link_exist "$BASH_IT/enabled/750---docker-compose.aliases.bash" run __check_completion 'bash-it enable plugin docker' assert_line -n 0 "docker docker-compose docker-machine" @@ -320,16 +320,16 @@ function __check_completion () { } @test "completion bash-it: enable - provide the docker* completions when docker-compose is enabled with the old location and priority-based name" { - ln -s "$BASH_IT/aliases/available/docker-compose.aliases.bash" "$BASH_IT/aliases/enabled/150---docker-compose.aliases.bash" - assert_link_exist "$BASH_IT/aliases/enabled/150---docker-compose.aliases.bash" + ln -s "$BASH_IT/aliases/available/docker-compose.aliases.bash" "$BASH_IT/aliases/enabled/750---docker-compose.aliases.bash" + assert_link_exist "$BASH_IT/aliases/enabled/750---docker-compose.aliases.bash" run __check_completion 'bash-it enable completion docker' assert_line -n 0 "docker docker-compose docker-machine" } @test "completion bash-it: enable - provide the docker* completions when docker-compose is enabled with the new location and priority-based name" { - ln -s "$BASH_IT/aliases/available/docker-compose.aliases.bash" "$BASH_IT/enabled/150---docker-compose.aliases.bash" - assert_link_exist "$BASH_IT/enabled/150---docker-compose.aliases.bash" + ln -s "$BASH_IT/aliases/available/docker-compose.aliases.bash" "$BASH_IT/enabled/750---docker-compose.aliases.bash" + assert_link_exist "$BASH_IT/enabled/750---docker-compose.aliases.bash" run __check_completion 'bash-it enable completion docker' assert_line -n 0 "docker docker-compose docker-machine" diff --git a/test/install/install.bats b/test/install/install.bats index 262bf4f0a7..2190f672ba 100644 --- a/test/install/install.bats +++ b/test/install/install.bats @@ -27,7 +27,7 @@ function local_setup { assert_file_exist "$BASH_IT_TEST_HOME/$BASH_IT_CONFIG_FILE" - assert_link_exist "$BASH_IT/enabled/150---general.aliases.bash" + assert_link_exist "$BASH_IT/enabled/750---general.aliases.bash" assert_link_exist "$BASH_IT/enabled/250---base.plugin.bash" assert_link_exist "$BASH_IT/enabled/365---alias-completion.plugin.bash" assert_link_exist "$BASH_IT/enabled/350---bash-it.completion.bash" diff --git a/test/lib/helpers.bats b/test/lib/helpers.bats index bd339d0419..89cdb51696 100755 --- a/test/lib/helpers.bats +++ b/test/lib/helpers.bats @@ -87,40 +87,40 @@ function local_setup { } @test "helpers: bash-it help list aliases with ag aliases enabled" { - ln -s $BASH_IT/aliases/available/ag.aliases.bash $BASH_IT/aliases/enabled/150---ag.aliases.bash - assert_link_exist "$BASH_IT/aliases/enabled/150---ag.aliases.bash" + ln -s $BASH_IT/aliases/available/ag.aliases.bash $BASH_IT/aliases/enabled/750---ag.aliases.bash + assert_link_exist "$BASH_IT/aliases/enabled/750---ag.aliases.bash" - run _help-list-aliases "$BASH_IT/aliases/enabled/150---ag.aliases.bash" + run _help-list-aliases "$BASH_IT/aliases/enabled/750---ag.aliases.bash" assert_line -n 0 "ag:" } @test "helpers: bash-it help list aliases with todo.txt-cli aliases enabled" { - ln -s $BASH_IT/aliases/available/todo.txt-cli.aliases.bash $BASH_IT/aliases/enabled/150---todo.txt-cli.aliases.bash - assert_link_exist "$BASH_IT/aliases/enabled/150---todo.txt-cli.aliases.bash" + ln -s $BASH_IT/aliases/available/todo.txt-cli.aliases.bash $BASH_IT/aliases/enabled/750---todo.txt-cli.aliases.bash + assert_link_exist "$BASH_IT/aliases/enabled/750---todo.txt-cli.aliases.bash" - run _help-list-aliases "$BASH_IT/aliases/enabled/150---todo.txt-cli.aliases.bash" + run _help-list-aliases "$BASH_IT/aliases/enabled/750---todo.txt-cli.aliases.bash" assert_line -n 0 "todo.txt-cli:" } @test "helpers: bash-it help list aliases with docker-compose aliases enabled" { - ln -s $BASH_IT/aliases/available/docker-compose.aliases.bash $BASH_IT/aliases/enabled/150---docker-compose.aliases.bash - assert_link_exist "$BASH_IT/aliases/enabled/150---docker-compose.aliases.bash" + ln -s $BASH_IT/aliases/available/docker-compose.aliases.bash $BASH_IT/aliases/enabled/750---docker-compose.aliases.bash + assert_link_exist "$BASH_IT/aliases/enabled/750---docker-compose.aliases.bash" - run _help-list-aliases "$BASH_IT/aliases/enabled/150---docker-compose.aliases.bash" + run _help-list-aliases "$BASH_IT/aliases/enabled/750---docker-compose.aliases.bash" assert_line -n 0 "docker-compose:" } @test "helpers: bash-it help list aliases with ag aliases enabled in global directory" { - ln -s $BASH_IT/aliases/available/ag.aliases.bash $BASH_IT/enabled/150---ag.aliases.bash - assert_link_exist "$BASH_IT/enabled/150---ag.aliases.bash" + ln -s $BASH_IT/aliases/available/ag.aliases.bash $BASH_IT/enabled/750---ag.aliases.bash + assert_link_exist "$BASH_IT/enabled/750---ag.aliases.bash" - run _help-list-aliases "$BASH_IT/enabled/150---ag.aliases.bash" + run _help-list-aliases "$BASH_IT/enabled/750---ag.aliases.bash" assert_line -n 0 "ag:" } @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_link_exist "$BASH_IT/aliases/enabled/150---ag.aliases.bash" + ln -s $BASH_IT/aliases/available/ag.aliases.bash $BASH_IT/aliases/enabled/750---ag.aliases.bash + assert_link_exist "$BASH_IT/aliases/enabled/750---ag.aliases.bash" run bash-it help aliases assert_line -n 0 "ag:" @@ -128,8 +128,8 @@ function local_setup { @test "helpers: bash-it help aliases one alias enabled in global directory" { run bash-it enable alias "ag" - assert_line -n 0 'ag enabled with priority 150.' - assert_link_exist "$BASH_IT/enabled/150---ag.aliases.bash" + assert_line -n 0 'ag enabled with priority 750.' + assert_link_exist "$BASH_IT/enabled/750---ag.aliases.bash" run bash-it enable plugin "aws" assert_line -n 0 'aws enabled with priority 250.' @@ -142,14 +142,14 @@ function local_setup { @test "helpers: enable the todo.txt-cli aliases through the bash-it function" { run bash-it enable alias "todo.txt-cli" - assert_line -n 0 'todo.txt-cli enabled with priority 150.' - assert_link_exist "$BASH_IT/enabled/150---todo.txt-cli.aliases.bash" + assert_line -n 0 'todo.txt-cli enabled with priority 750.' + assert_link_exist "$BASH_IT/enabled/750---todo.txt-cli.aliases.bash" } @test "helpers: enable the curl aliases" { run _enable-alias "curl" - assert_line -n 0 'curl enabled with priority 150.' - assert_link_exist "$BASH_IT/enabled/150---curl.aliases.bash" + assert_line -n 0 'curl enabled with priority 750.' + assert_link_exist "$BASH_IT/enabled/750---curl.aliases.bash" } @test "helpers: enable the apm completion through the bash-it function" { @@ -294,7 +294,7 @@ function local_setup { run _bash-it-profile-load "default" assert_success - assert_link_exist "$BASH_IT/enabled/150---general.aliases.bash" + assert_link_exist "$BASH_IT/enabled/750---general.aliases.bash" assert_link_exist "$BASH_IT/enabled/250---base.plugin.bash" assert_link_exist "$BASH_IT/enabled/365---alias-completion.plugin.bash" assert_link_exist "$BASH_IT/enabled/350---bash-it.completion.bash" @@ -354,7 +354,7 @@ function local_setup { run _enable-completion "system" run _bash-it-profile-load "test" - assert_link_not_exist "$BASH_IT/enabled/150---general.aliases.bash" + assert_link_not_exist "$BASH_IT/enabled/750---general.aliases.bash" assert_link_not_exist "$BASH_IT/enabled/250---base.plugin.bash" assert_link_not_exist "$BASH_IT/enabled/365---alias-completion.plugin.bash" assert_link_not_exist "$BASH_IT/enabled/350---bash-it.completion.bash" @@ -372,9 +372,9 @@ function local_setup { assert_success run _disable-alias "general" - assert_link_not_exist "$BASH_IT/enabled/150---general.aliases.bash" + assert_link_not_exist "$BASH_IT/enabled/750---general.aliases.bash" run _bash-it-profile-load "test" - assert_link_exist "$BASH_IT/enabled/150---general.aliases.bash" + assert_link_exist "$BASH_IT/enabled/750---general.aliases.bash" } @test "helpers: profile load corrupted profile file: bad component" { @@ -472,12 +472,12 @@ function local_setup { run _bash-it-migrate assert_line -n 0 'Migrating alias todo.txt-cli.' assert_line -n 1 'todo.txt-cli disabled.' - assert_line -n 2 'todo.txt-cli enabled with priority 150.' + assert_line -n 2 'todo.txt-cli enabled with priority 750.' assert_link_exist "$BASH_IT/enabled/225---nvm.plugin.bash" assert_link_exist "$BASH_IT/enabled/250---node.plugin.bash" assert_link_exist "$BASH_IT/enabled/250---ssh.plugin.bash" - assert_link_exist "$BASH_IT/enabled/150---todo.txt-cli.aliases.bash" + assert_link_exist "$BASH_IT/enabled/750---todo.txt-cli.aliases.bash" assert [ ! -L "$BASH_IT/plugins/enabled/node.plugin.bash" ] assert [ ! -L "$BASH_IT/plugins/enabled/nvm.plugin.bash" ] assert [ ! -L "$BASH_IT/aliases/enabled/todo.txt-cli.aliases.bash" ] @@ -500,7 +500,7 @@ function local_setup { assert_link_exist "$BASH_IT/enabled/225---nvm.plugin.bash" assert_link_exist "$BASH_IT/enabled/250---node.plugin.bash" assert_link_exist "$BASH_IT/enabled/250---ssh.plugin.bash" - assert_link_exist "$BASH_IT/enabled/150---todo.txt-cli.aliases.bash" + assert_link_exist "$BASH_IT/enabled/750---todo.txt-cli.aliases.bash" assert [ ! -L "$BASH_IT/plugins/enabled/225----node.plugin.bash" ] assert [ ! -L "$BASH_IT/plugins/enabled/250----nvm.plugin.bash" ] assert [ ! -L "$BASH_IT/aliases/enabled/250----todo.txt-cli.aliases.bash" ] @@ -641,12 +641,12 @@ function __migrate_all_components() { assert_equal "$available" "$enabled" run _enable-alias "ag" - assert_link_exist "$BASH_IT/enabled/150---ag.aliases.bash" + assert_link_exist "$BASH_IT/enabled/750---ag.aliases.bash" run _disable-plugin "all" local enabled2=$(find $BASH_IT/enabled -name [0-9]*.plugin.bash | wc -l | xargs) assert_equal "0" "$enabled2" - assert_link_exist "$BASH_IT/enabled/150---ag.aliases.bash" + assert_link_exist "$BASH_IT/enabled/750---ag.aliases.bash" } @test "helpers: disable all plugins in the old directory structure" { @@ -660,12 +660,12 @@ function __migrate_all_components() { assert_equal "2" "$enabled" run _enable-alias "ag" - assert_link_exist "$BASH_IT/enabled/150---ag.aliases.bash" + assert_link_exist "$BASH_IT/enabled/750---ag.aliases.bash" run _disable-plugin "all" local enabled2=$(find $BASH_IT/plugins/enabled -name *.plugin.bash | wc -l | xargs) assert_equal "0" "$enabled2" - assert_link_exist "$BASH_IT/enabled/150---ag.aliases.bash" + assert_link_exist "$BASH_IT/enabled/750---ag.aliases.bash" } @test "helpers: disable all plugins in the old directory structure with priority" { @@ -679,12 +679,12 @@ function __migrate_all_components() { assert_equal "2" "$enabled" run _enable-alias "ag" - assert_link_exist "$BASH_IT/enabled/150---ag.aliases.bash" + assert_link_exist "$BASH_IT/enabled/750---ag.aliases.bash" run _disable-plugin "all" local enabled2=$(find $BASH_IT/plugins/enabled -name *.plugin.bash | wc -l | xargs) assert_equal "0" "$enabled2" - assert_link_exist "$BASH_IT/enabled/150---ag.aliases.bash" + assert_link_exist "$BASH_IT/enabled/750---ag.aliases.bash" } @test "helpers: disable all plugins without anything enabled" { @@ -692,18 +692,18 @@ function __migrate_all_components() { assert_equal "0" "$enabled" run _enable-alias "ag" - assert_link_exist "$BASH_IT/enabled/150---ag.aliases.bash" + assert_link_exist "$BASH_IT/enabled/750---ag.aliases.bash" run _disable-plugin "all" local enabled2=$(find $BASH_IT/enabled -name [0-9]*.plugin.bash | wc -l | xargs) assert_equal "0" "$enabled2" - assert_link_exist "$BASH_IT/enabled/150---ag.aliases.bash" + assert_link_exist "$BASH_IT/enabled/750---ag.aliases.bash" } @test "helpers: enable the ansible aliases through the bash-it function" { run bash-it enable alias "ansible" - assert_line -n 0 'ansible enabled with priority 150.' - assert_link_exist "$BASH_IT/enabled/150---ansible.aliases.bash" + assert_line -n 0 'ansible enabled with priority 750.' + assert_link_exist "$BASH_IT/enabled/750---ansible.aliases.bash" } @test "helpers: describe the nvm plugin without enabling it" { diff --git a/test/lib/utilities.bats b/test/lib/utilities.bats index a0968fce44..a0af5ef11d 100644 --- a/test/lib/utilities.bats +++ b/test/lib/utilities.bats @@ -14,7 +14,7 @@ function local_setup { @test "_bash-it-component-item-is-enabled() - for an enabled/disabled item" { run bash-it enable alias svn - assert_line -n 0 'svn enabled with priority 150.' + assert_line -n 0 'svn enabled with priority 750.' run _bash-it-component-item-is-enabled alias svn assert_success @@ -37,7 +37,7 @@ function local_setup { @test "_bash-it-component-item-is-disabled() - for an enabled/disabled item" { run bash-it enable alias svn - assert_line -n 0 'svn enabled with priority 150.' + assert_line -n 0 'svn enabled with priority 750.' run _bash-it-component-item-is-disabled alias svn assert_failure