Full featured search test, dig into travis failures

pull/687/head
Konstantin Gredeskoul 2016-03-24 03:05:03 -07:00
parent fa392e0e18
commit 8c5ec75898
2 changed files with 8 additions and 7 deletions

View File

@ -9,13 +9,14 @@ load ../../lib/helpers
NO_COLOR=true
IS_DARWIN=
[[ "$(uname -s)" == "Darwin" ]] && IS_DARWIN=true
@test "helpers search aliases" {
if [ -z "$IS_DARWIN" ]; then
skip 'search test only runs on OSX'
fi
run _bash-it-search-component 'plugins' 'base'
[[ "${lines[0]}" =~ 'plugins' && "${lines[0]}" =~ 'base' ]]
}
@test "helpers search all ruby et al" {
run _bash-it-search 'ruby' 'gem' 'bundle' 'rake' 'rails'
[[ "${lines[0]}" == 'aliases : bundler rails' ]]
[[ "${lines[1]}" == 'plugins : chruby chruby-auto ruby' ]]
[[ "${lines[2]}" == 'completions : bundler gem rake' ]]
}

View File

@ -3,4 +3,4 @@ PATH=$PATH:$(pwd)/bats/bin
set +e
[[ -z "$(which bats)" ]] && git clone --depth 1 https://github.com/sstephenson/bats.git
set -e
exec bats ${CI:+--tap} test/{lib,plugins}
exec ./bats/bin/bats ${CI:+--tap} ./test/{lib,plugins}