Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clean_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ themes/oh-my-posh
themes/p4helpers.theme.bash
themes/pete
themes/powerline
themes/powerline-naked
themes/powerline-multiline
themes/powerline-naked
themes/pure
themes/purity
themes/rjorgenson
Expand Down
60 changes: 30 additions & 30 deletions test/lib/utilities.bats
Original file line number Diff line number Diff line change
Expand Up @@ -7,68 +7,68 @@ function local_setup_file() {
}

@test "utilities: _is_function: _command_exists" {
run _is_function _command_exists
assert_success
run _is_function _command_exists
assert_success
}

@test "utilities: _command_exists function positive test ls" {
run _command_exists ls
assert_success
run _command_exists ls
assert_success
}

@test "utilities: _command_exists function positive test bash-it" {
run _command_exists bash-it
assert_success
run _command_exists bash-it
assert_success
}

@test "utilities: _command_exists function negative test" {
run _command_exists "__addfkds_dfdsjdf_${RANDOM:-}"
assert_failure
run _command_exists "__addfkds_dfdsjdf_${RANDOM:-}"
assert_failure
}

@test "utilities: _is_function: _binary_exists" {
run _is_function _binary_exists
assert_success
run _is_function _binary_exists
assert_success
}

@test "utilities: _binary_exists function positive test ls" {
run _binary_exists ls
assert_success
run _binary_exists ls
assert_success
}

@test "utilities: _binary_exists function negative test function" {
run _binary_exists _binary_exists
assert_failure
run _binary_exists _binary_exists
assert_failure
}

@test "utilities: _binary_exists function negative test" {
run _binary_exists "__addfkds_dfdsjdf_${RANDOM:-}"
assert_failure
run _binary_exists "__addfkds_dfdsjdf_${RANDOM:-}"
assert_failure
}

@test "utilities: _is_function: _completion_exists" {
run _is_function _completion_exists
assert_success
run _is_function _completion_exists
assert_success
}

@test "utilities: _is_function new function" {
local teh_new_func="__addfkds_dfdsjdf_${RANDOM:-}"
run _is_function "${teh_new_func?}"
assert_failure
local teh_new_func="__addfkds_dfdsjdf_${RANDOM:-}"
run _is_function "${teh_new_func?}"
assert_failure

cite "${teh_new_func?}"
run _is_function "${teh_new_func?}"
assert_success
cite "${teh_new_func?}"
run _is_function "${teh_new_func?}"
assert_success
}

@test "utilities: _command_exists new function" {
local teh_new_func="__addfkds_dfdsjdf_${RANDOM:-}"
run _command_exists "${teh_new_func?}"
assert_failure
local teh_new_func="__addfkds_dfdsjdf_${RANDOM:-}"
run _command_exists "${teh_new_func?}"
assert_failure

cite "${teh_new_func?}"
run _command_exists "${teh_new_func?}"
assert_success
cite "${teh_new_func?}"
run _command_exists "${teh_new_func?}"
assert_success
}

@test "_bash-it-component-item-is-enabled() - for a disabled item" {
Expand Down
2 changes: 1 addition & 1 deletion themes/powerline-naked/powerline-naked.base.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ source "${BASH_IT?}/themes/powerline/powerline.base.bash"
function __powerline_left_segment {
local OLD_IFS="${IFS}"
IFS="|"
local params=($1)
local params=("$1")
IFS="${OLD_IFS}"
Comment on lines 8 to 10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These three lines obviously try to split $1 with the separator |, so $1 should not be quoted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, I moved to fast obviously.

local separator=""
local pad_before_segment=" "
Expand Down
Loading