Refactored test run script so that you can run a single file

Call it like this:

test/run test/plugins/battery.plugin.bats

If called without any parameters, all of the tests are run.
pull/1080/head
Nils Winkler 2017-10-20 14:52:08 +02:00
parent 5ab23e3ca0
commit d39d14b140
1 changed files with 7 additions and 1 deletions

View File

@ -10,4 +10,10 @@ if [ -z "${BASH_IT}" ]; then
export BASH_IT export BASH_IT
fi fi
exec $bats_executable ${CI:+--tap} ${test_directory}/{bash_it,completion,install,lib,plugins,themes} if [ -z "$1" ]; then
test_dirs=( ${test_directory}/{bash_it,completion,install,lib,plugins,themes} )
else
test_dirs=( "$1" )
fi
exec $bats_executable ${CI:+--tap} "${test_dirs[@]}"