test/theme: adopt newly revamped setup()
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
#!/usr/bin/env bats
|
||||
# shellcheck shell=bats
|
||||
|
||||
load ../test_helper
|
||||
load ../test_helper_libs
|
||||
load ../../themes/base.theme
|
||||
load "${MAIN_BASH_IT_DIR?}/test/test_helper.bash"
|
||||
|
||||
function local_setup_file() {
|
||||
setup_libs "colors" #"theme"
|
||||
load "${BASH_IT?}/themes/base.theme.bash"
|
||||
}
|
||||
|
||||
@test 'themes base: battery_percentage should not exist' {
|
||||
run type -a battery_percentage &> /dev/null
|
||||
@@ -10,7 +13,7 @@ load ../../themes/base.theme
|
||||
}
|
||||
|
||||
@test 'themes base: battery_percentage should exist if battery plugin loaded' {
|
||||
load ../../plugins/available/battery.plugin
|
||||
load "${BASH_IT?}/plugins/available/battery.plugin.bash"
|
||||
|
||||
run type -a battery_percentage &> /dev/null
|
||||
assert_success
|
||||
@@ -28,12 +31,12 @@ load ../../themes/base.theme
|
||||
@test 'themes base: battery_char should exist if battery plugin loaded' {
|
||||
unset -f battery_char
|
||||
|
||||
load ../../plugins/available/battery.plugin
|
||||
load "${BASH_IT?}/plugins/available/battery.plugin.bash"
|
||||
run type -t battery_percentage
|
||||
assert_success
|
||||
assert_line "function"
|
||||
|
||||
load ../../themes/base.theme
|
||||
load "${BASH_IT?}/themes/base.theme.bash"
|
||||
run type -t battery_char
|
||||
assert_success
|
||||
assert_line "function"
|
||||
@@ -51,13 +54,13 @@ load ../../themes/base.theme
|
||||
|
||||
run battery_charge
|
||||
assert_success
|
||||
assert_line -n 0 ""
|
||||
assert_output ""
|
||||
}
|
||||
|
||||
@test 'themes base: battery_charge should exist if battery plugin loaded' {
|
||||
unset -f battery_charge
|
||||
load ../../plugins/available/battery.plugin
|
||||
load ../../themes/base.theme
|
||||
load "${BASH_IT?}/plugins/available/battery.plugin.bash"
|
||||
load "${BASH_IT?}/themes/base.theme.bash"
|
||||
|
||||
run type -a battery_charge &> /dev/null
|
||||
assert_success
|
||||
|
||||
Reference in New Issue
Block a user