tests: new file `test_helper_libs.bash`
For testing non-core files, just `load ../test_helper_libs` after `load ../test_helper` instead of trying to guess which libs must be loaded, in which order, for testing to succeed. `_command_exists` spews log messages, so our test log is littered with `_log_debug not found`. This fixes that too.pull/2002/head
parent
9dcbeec7ad
commit
da6b27166f
|
|
@ -123,6 +123,7 @@ plugins/available/zoxide.plugin.bash
|
||||||
#
|
#
|
||||||
test/plugins/alias-completion.plugin.bats
|
test/plugins/alias-completion.plugin.bats
|
||||||
test/test_helper.bash
|
test/test_helper.bash
|
||||||
|
test/test_helper_libs.bash
|
||||||
|
|
||||||
# themes
|
# themes
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,7 @@
|
||||||
#!/usr/bin/env bats
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
load ../test_helper
|
load ../test_helper
|
||||||
load ../../lib/log
|
load ../test_helper_libs
|
||||||
load ../../lib/utilities
|
|
||||||
load ../../lib/search
|
|
||||||
|
|
||||||
load ../../lib/helpers
|
|
||||||
load ../../plugins/available/base.plugin
|
load ../../plugins/available/base.plugin
|
||||||
|
|
||||||
function local_setup {
|
function local_setup {
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,7 @@
|
||||||
#!/usr/bin/env bats
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
load ../test_helper
|
load ../test_helper
|
||||||
load ../../lib/log
|
load ../test_helper_libs
|
||||||
load ../../lib/helpers
|
|
||||||
load ../../lib/utilities
|
|
||||||
load ../../lib/search
|
|
||||||
|
|
||||||
load ../../plugins/available/base.plugin
|
load ../../plugins/available/base.plugin
|
||||||
load ../../aliases/available/git.aliases
|
load ../../aliases/available/git.aliases
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,7 @@
|
||||||
#!/usr/bin/env bats
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
load ../test_helper
|
load ../test_helper
|
||||||
load ../../lib/log
|
load ../test_helper_libs
|
||||||
load ../../lib/helpers
|
|
||||||
load ../../lib/utilities
|
|
||||||
load ../../lib/search
|
|
||||||
|
|
||||||
function local_setup {
|
function local_setup {
|
||||||
setup_test_fixture
|
setup_test_fixture
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
#!/usr/bin/env bats
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
load ../test_helper
|
load ../test_helper
|
||||||
load ../../lib/log
|
load ../test_helper_libs
|
||||||
load ../../lib/helpers
|
|
||||||
|
|
||||||
load ../../completion/available/capistrano.completion
|
load ../../completion/available/capistrano.completion
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
#!/usr/bin/env bats
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
load ../test_helper
|
load ../test_helper
|
||||||
load ../../lib/log
|
load ../test_helper_libs
|
||||||
load ../../lib/helpers
|
|
||||||
load ../../plugins/available/base.plugin
|
load ../../plugins/available/base.plugin
|
||||||
|
|
||||||
@test 'plugins base: ips()' {
|
@test 'plugins base: ips()' {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
#!/usr/bin/env bats
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
load ../test_helper
|
load ../test_helper
|
||||||
load "${BASH_IT}/lib/log.bash"
|
load ../test_helper_libs
|
||||||
load "${BASH_IT}/lib/helpers.bash"
|
|
||||||
|
|
||||||
load ../../plugins/available/battery.plugin
|
load ../../plugins/available/battery.plugin
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bats
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
load ../test_helper
|
load ../test_helper
|
||||||
load ../../lib/helpers
|
load ../test_helper_libs
|
||||||
load ../../vendor/init.d/preexec
|
load ../../vendor/init.d/preexec
|
||||||
|
|
||||||
load ../../plugins/available/cmd-returned-notify.plugin
|
load ../../plugins/available/cmd-returned-notify.plugin
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bats
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
load ../test_helper
|
load ../test_helper
|
||||||
load ../../lib/helpers
|
load ../test_helper_libs
|
||||||
|
|
||||||
# We test `go version` in each test to account for users with goenv and no system go.
|
# We test `go version` in each test to account for users with goenv and no system go.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bats
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
load ../test_helper
|
load ../test_helper
|
||||||
load ../../lib/helpers
|
load ../test_helper_libs
|
||||||
|
|
||||||
function local_setup {
|
function local_setup {
|
||||||
setup_test_fixture
|
setup_test_fixture
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
#!/usr/bin/env bats
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
load ../test_helper
|
load ../test_helper
|
||||||
load ../../lib/log
|
load ../test_helper_libs
|
||||||
load ../../lib/helpers
|
|
||||||
|
|
||||||
load ../../plugins/available/xterm.plugin
|
load ../../plugins/available/xterm.plugin
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
|
load "${BASH_IT}/lib/log.bash"
|
||||||
|
load "${BASH_IT}/lib/utilities.bash"
|
||||||
|
load "${BASH_IT}/lib/helpers.bash"
|
||||||
|
load "${BASH_IT}/lib/search.bash"
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
#!/usr/bin/env bats
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
load ../test_helper
|
load ../test_helper
|
||||||
load ../../lib/log
|
load ../test_helper_libs
|
||||||
|
|
||||||
load ../../lib/helpers
|
|
||||||
load ../../themes/base.theme
|
load ../../themes/base.theme
|
||||||
|
|
||||||
@test 'themes base: battery_percentage should not exist' {
|
@test 'themes base: battery_percentage should not exist' {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
#!/usr/bin/env bats
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
load ../test_helper
|
load ../test_helper
|
||||||
load ../../lib/log
|
load ../test_helper_libs
|
||||||
|
|
||||||
load ../../lib/helpers
|
|
||||||
load ../../themes/githelpers.theme
|
load ../../themes/githelpers.theme
|
||||||
load ../../themes/base.theme
|
load ../../themes/base.theme
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
#!/usr/bin/env bats
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
load ../test_helper
|
load ../test_helper
|
||||||
load ../../lib/log
|
load ../test_helper_libs
|
||||||
|
|
||||||
load ../../lib/helpers
|
|
||||||
|
|
||||||
function local_setup {
|
function local_setup {
|
||||||
setup_test_fixture
|
setup_test_fixture
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue