From 8c5ec7589881c2d4ae384d02cc8c3bae22e49bd3 Mon Sep 17 00:00:00 2001 From: Konstantin Gredeskoul Date: Thu, 24 Mar 2016 03:05:03 -0700 Subject: [PATCH] Full featured search test, dig into travis failures --- test/lib/helpers.bats | 13 +++++++------ test/run | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/test/lib/helpers.bats b/test/lib/helpers.bats index 47cb6797..af9ae6b6 100644 --- a/test/lib/helpers.bats +++ b/test/lib/helpers.bats @@ -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' ]] +} diff --git a/test/run b/test/run index 2efc35d0..6bc2f578 100755 --- a/test/run +++ b/test/run @@ -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}