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"
|
||||
|
||||
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
|
||||
unset matches
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
#!/usr/bin/env bats
|
||||
|
||||
load ../../lib/composure
|
||||
load ../../plugins/available/base.plugin
|
||||
|
||||
cite _about _param _example _group _author _version
|
||||
|
||||
load ../../lib/helpers
|
||||
load ../../plugins/available/base.plugin
|
||||
|
||||
NO_COLOR=true
|
||||
|
||||
@test "helpers search aliases" {
|
||||
run _bash-it-search-component 'plugins' 'base'
|
||||
[[ "${lines[0]}" =~ 'plugins: base' ]]
|
||||
[[ "${lines[0]}" =~ 'plugins' && "${lines[0]}" =~ 'base' ]]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue