Trying to fix the tests:
- slightly better alignment - more resilient test expressionpull/681/head
parent
7a52fa6467
commit
9f6255cd42
|
|
@ -190,7 +190,7 @@ _bash-it-search-component() {
|
||||||
[[ -n "$NO_COLOR" && color_off="" ]] || color_off="\e[0;0m"
|
[[ -n "$NO_COLOR" && color_off="" ]] || color_off="\e[0;0m"
|
||||||
|
|
||||||
if [[ "${#matches[*]}" -gt 0 ]] ; then
|
if [[ "${#matches[*]}" -gt 0 ]] ; then
|
||||||
printf "%15s: ${color_on}%s${color_off}\n" "${_component}" "$(echo -n ${matches[*]} | tr ' ' '\n' | sort | uniq | tr '\n' ' ' | sed 's/ $//g')"
|
printf "%-12s: ${color_on}%s${color_off}\n" "${_component}" "$(echo -n ${matches[*]} | tr ' ' '\n' | sort | uniq | tr '\n' ' ' | sed 's/ $//g')"
|
||||||
fi
|
fi
|
||||||
unset matches
|
unset matches
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,15 @@
|
||||||
#!/usr/bin/env bats
|
#!/usr/bin/env bats
|
||||||
|
|
||||||
load ../../lib/composure
|
load ../../lib/composure
|
||||||
|
load ../../plugins/available/base.plugin
|
||||||
|
|
||||||
cite _about _param _example _group _author _version
|
cite _about _param _example _group _author _version
|
||||||
|
|
||||||
load ../../lib/helpers
|
load ../../lib/helpers
|
||||||
load ../../plugins/available/base.plugin
|
|
||||||
|
|
||||||
NO_COLOR=true
|
NO_COLOR=true
|
||||||
|
|
||||||
@test "helpers search aliases" {
|
@test "helpers search aliases" {
|
||||||
run _bash-it-search-component 'plugins' 'base'
|
run _bash-it-search-component 'plugins' 'base'
|
||||||
[[ "${lines[0]}" =~ 'plugins: base' ]]
|
[[ "${lines[0]}" =~ 'plugins' && "${lines[0]}" =~ 'base' ]]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue