From 9dcbeec7ad2b512c3bec0df5341b4eb4378b21a1 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Tue, 19 Oct 2021 11:28:48 -0400 Subject: [PATCH] tests: test_helper already loads `composure.sh` ...and `cite()`s metadata --- test/bash_it/bash_it.bats | 1 - test/completion/bash-it.completion.bats | 1 - test/install/install.bats | 1 - test/install/uninstall.bats | 1 - test/lib/composure.bats | 1 - test/lib/helpers.bats | 3 --- test/lib/log.bats | 4 +--- test/lib/search.bats | 3 --- test/lib/utilities.bats | 4 +--- test/plugins/alias-completion.plugin.bats | 3 --- test/plugins/base.plugin.bats | 1 - test/plugins/battery.plugin.bats | 3 --- test/plugins/cmd-returned-notify.plugin.bats | 2 +- test/plugins/go.plugin.bats | 1 - test/plugins/ruby.plugin.bats | 6 ++---- test/plugins/xterm.plugin.bats | 1 - test/themes/base.theme.bats | 3 --- test/themes/base.theme.git.bats | 3 --- test/themes/base.theme.svn.bats | 3 --- 19 files changed, 5 insertions(+), 40 deletions(-) mode change 100755 => 100644 test/lib/composure.bats mode change 100755 => 100644 test/plugins/base.plugin.bats mode change 100755 => 100644 test/plugins/battery.plugin.bats mode change 100755 => 100644 test/plugins/ruby.plugin.bats diff --git a/test/bash_it/bash_it.bats b/test/bash_it/bash_it.bats index a692909e..13c84238 100644 --- a/test/bash_it/bash_it.bats +++ b/test/bash_it/bash_it.bats @@ -1,7 +1,6 @@ #!/usr/bin/env bats load ../test_helper -load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" function local_setup { setup_test_fixture diff --git a/test/completion/bash-it.completion.bats b/test/completion/bash-it.completion.bats index fbf0a3fa..cb1761bf 100644 --- a/test/completion/bash-it.completion.bats +++ b/test/completion/bash-it.completion.bats @@ -1,7 +1,6 @@ #!/usr/bin/env bats load ../test_helper -load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" load ../../completion/available/bash-it.completion function local_setup { diff --git a/test/install/install.bats b/test/install/install.bats index 40f3162d..4a88e23f 100644 --- a/test/install/install.bats +++ b/test/install/install.bats @@ -1,7 +1,6 @@ #!/usr/bin/env bats load ../test_helper -load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" # Determine which config file to use based on OS. case $OSTYPE in diff --git a/test/install/uninstall.bats b/test/install/uninstall.bats index 038125b3..16bb7f7b 100644 --- a/test/install/uninstall.bats +++ b/test/install/uninstall.bats @@ -1,7 +1,6 @@ #!/usr/bin/env bats load ../test_helper -load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" # Determine which config file to use based on OS. case $OSTYPE in diff --git a/test/lib/composure.bats b/test/lib/composure.bats old mode 100755 new mode 100644 index 02da83eb..8198936c --- a/test/lib/composure.bats +++ b/test/lib/composure.bats @@ -1,7 +1,6 @@ #!/usr/bin/env bats load ../test_helper -load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" @test "lib composure: _composure_keywords()" { run _composure_keywords diff --git a/test/lib/helpers.bats b/test/lib/helpers.bats index d876d882..ea7bc68e 100644 --- a/test/lib/helpers.bats +++ b/test/lib/helpers.bats @@ -1,13 +1,10 @@ #!/usr/bin/env bats load ../test_helper -load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" load ../../lib/log load ../../lib/utilities load ../../lib/search -cite _about _param _example _group _author _version - load ../../lib/helpers load ../../plugins/available/base.plugin diff --git a/test/lib/log.bats b/test/lib/log.bats index 329386bd..00efbc2d 100644 --- a/test/lib/log.bats +++ b/test/lib/log.bats @@ -1,10 +1,8 @@ #!/usr/bin/env bats load ../test_helper -load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" -load ../../lib/appearance +load ../../themes/colors.theme -cite _about _param _example _group _author _version load ../../lib/log load ../../lib/helpers load ../../plugins/available/base.plugin diff --git a/test/lib/search.bats b/test/lib/search.bats index 2081abab..6a54a62d 100644 --- a/test/lib/search.bats +++ b/test/lib/search.bats @@ -1,14 +1,11 @@ #!/usr/bin/env bats load ../test_helper -load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" load ../../lib/log load ../../lib/helpers load ../../lib/utilities load ../../lib/search -cite _about _param _example _group _author _version - load ../../plugins/available/base.plugin load ../../aliases/available/git.aliases load ../../plugins/available/ruby.plugin diff --git a/test/lib/utilities.bats b/test/lib/utilities.bats index 4907a763..9554a2db 100644 --- a/test/lib/utilities.bats +++ b/test/lib/utilities.bats @@ -1,13 +1,11 @@ #!/usr/bin/env bats load ../test_helper -load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" +load ../../lib/log load ../../lib/helpers load ../../lib/utilities load ../../lib/search -cite _about _param _example _group _author _version - function local_setup { setup_test_fixture } diff --git a/test/plugins/alias-completion.plugin.bats b/test/plugins/alias-completion.plugin.bats index 497dded9..b0ad2659 100644 --- a/test/plugins/alias-completion.plugin.bats +++ b/test/plugins/alias-completion.plugin.bats @@ -1,12 +1,9 @@ #!/usr/bin/env bats load ../test_helper -load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" load ../../lib/log load ../../lib/helpers -cite _about _param _example _group _author _version - load ../../completion/available/capistrano.completion @test "alias-completion: See that aliases with double quotes and brackets do not break the plugin" { diff --git a/test/plugins/base.plugin.bats b/test/plugins/base.plugin.bats old mode 100755 new mode 100644 index 6f1099cc..2f1cd327 --- a/test/plugins/base.plugin.bats +++ b/test/plugins/base.plugin.bats @@ -1,7 +1,6 @@ #!/usr/bin/env bats load ../test_helper -load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" load ../../lib/log load ../../lib/helpers load ../../plugins/available/base.plugin diff --git a/test/plugins/battery.plugin.bats b/test/plugins/battery.plugin.bats old mode 100755 new mode 100644 index fda52b02..b7ea5e8a --- a/test/plugins/battery.plugin.bats +++ b/test/plugins/battery.plugin.bats @@ -1,12 +1,9 @@ #!/usr/bin/env bats load ../test_helper -load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" load "${BASH_IT}/lib/log.bash" load "${BASH_IT}/lib/helpers.bash" -cite _about _param _example _group _author _version - load ../../plugins/available/battery.plugin # Sets up the `_command_exists` function so that it only responds `true` if called with diff --git a/test/plugins/cmd-returned-notify.plugin.bats b/test/plugins/cmd-returned-notify.plugin.bats index f201e465..8e14f565 100644 --- a/test/plugins/cmd-returned-notify.plugin.bats +++ b/test/plugins/cmd-returned-notify.plugin.bats @@ -2,7 +2,7 @@ load ../test_helper load ../../lib/helpers -load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" +load ../../vendor/init.d/preexec load ../../plugins/available/cmd-returned-notify.plugin diff --git a/test/plugins/go.plugin.bats b/test/plugins/go.plugin.bats index 110699e8..f421bbf7 100644 --- a/test/plugins/go.plugin.bats +++ b/test/plugins/go.plugin.bats @@ -2,7 +2,6 @@ load ../test_helper load ../../lib/helpers -load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" # We test `go version` in each test to account for users with goenv and no system go. diff --git a/test/plugins/ruby.plugin.bats b/test/plugins/ruby.plugin.bats old mode 100755 new mode 100644 index 7a719020..6a3d7893 --- a/test/plugins/ruby.plugin.bats +++ b/test/plugins/ruby.plugin.bats @@ -2,14 +2,14 @@ load ../test_helper load ../../lib/helpers -load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" -load ../../plugins/available/ruby.plugin function local_setup { setup_test_fixture export OLD_PATH="$PATH" export PATH="/usr/bin:/bin:/usr/sbin" + + load ../../plugins/available/ruby.plugin } function local_teardown { @@ -27,8 +27,6 @@ function local_teardown { skip 'ruby not installed' fi - load ../../plugins/available/ruby.plugin - local last_path_entry=$(echo $PATH | tr ":" "\n" | tail -1) [[ "${last_path_entry}" == "${HOME}"/.gem/ruby/*/bin ]] } diff --git a/test/plugins/xterm.plugin.bats b/test/plugins/xterm.plugin.bats index 9c86e5c7..0a4eb859 100644 --- a/test/plugins/xterm.plugin.bats +++ b/test/plugins/xterm.plugin.bats @@ -3,7 +3,6 @@ load ../test_helper load ../../lib/log load ../../lib/helpers -load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" load ../../plugins/available/xterm.plugin diff --git a/test/themes/base.theme.bats b/test/themes/base.theme.bats index dc8213d3..a7067b83 100644 --- a/test/themes/base.theme.bats +++ b/test/themes/base.theme.bats @@ -1,11 +1,8 @@ #!/usr/bin/env bats load ../test_helper -load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" load ../../lib/log -cite _about _param _example _group _author _version - load ../../lib/helpers load ../../themes/base.theme diff --git a/test/themes/base.theme.git.bats b/test/themes/base.theme.git.bats index f2c4b9c2..bc354867 100644 --- a/test/themes/base.theme.git.bats +++ b/test/themes/base.theme.git.bats @@ -1,11 +1,8 @@ #!/usr/bin/env bats load ../test_helper -load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" load ../../lib/log -cite _about _param _example _group _author _version - load ../../lib/helpers load ../../themes/githelpers.theme load ../../themes/base.theme diff --git a/test/themes/base.theme.svn.bats b/test/themes/base.theme.svn.bats index d1c2c311..e8b4cb13 100644 --- a/test/themes/base.theme.svn.bats +++ b/test/themes/base.theme.svn.bats @@ -1,11 +1,8 @@ #!/usr/bin/env bats load ../test_helper -load "${BASH_IT}/vendor/github.com/erichs/composure/composure.sh" load ../../lib/log -cite _about _param _example _group _author _version - load ../../lib/helpers function local_setup {