From a9bf098c7a7acb750dbc272e0435c1554ef0e0ed Mon Sep 17 00:00:00 2001 From: Konstantin Gredeskoul Date: Wed, 23 Mar 2016 23:26:13 -0700 Subject: [PATCH] bash-it search functionality: allow test to skip on travis --- test/lib/helpers.bats | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/test/lib/helpers.bats b/test/lib/helpers.bats index 8e4e3468..47cb6797 100644 --- a/test/lib/helpers.bats +++ b/test/lib/helpers.bats @@ -8,12 +8,14 @@ cite _about _param _example _group _author _version load ../../lib/helpers NO_COLOR=true -IS_DARWIN=false + +IS_DARWIN= [[ "$(uname -s)" == "Darwin" ]] && IS_DARWIN=true -if [ "$IS_DARWIN" == "true" ]; then - @test "helpers search aliases" { - run _bash-it-search-component 'plugins' 'base' - [[ "${lines[0]}" =~ 'plugins' && "${lines[0]}" =~ 'base' ]] - } -fi +@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' ]] +}