mirror of
https://github.com/valitydev/riak_test.git
synced 2024-11-06 00:25:22 +00:00
17 lines
480 B
Bash
17 lines
480 B
Bash
#compdef riak_test
|
|
|
|
_riak_test() {
|
|
local curcontext="$curcontext" state line
|
|
typeset -A opt_args
|
|
|
|
TESTS=$(ls ./tests/*.erl | xargs basename -s .erl | tr '\n' ' ')
|
|
CONFIGS=$(cat ~/.riak_test.config | grep \^{ | sed s/{// | tr ', [\n' ' ')
|
|
|
|
_arguments \
|
|
"(-t -c -s -d -v -o -b -r)-h[print usage page]" \
|
|
"-c+[specify the project configuraiton file]:config:($CONFIGS)" \
|
|
"-t+[specify which tests to run]:tests:($TESTS)"
|
|
}
|
|
|
|
_riak_test "$@"
|