Browse Source

Add short-options to the eunit provider.

This patch adds support for short options in the eunit provider.
pull/1092/head
Alexander Færøy 9 years ago
parent
commit
da39732fd3
No known key found for this signature in database GPG Key ID: E15081D5D3C3DB53
4 changed files with 13 additions and 13 deletions
  1. +1
    -1
      priv/shell-completion/bash/rebar3
  2. +4
    -4
      priv/shell-completion/fish/rebar3.fish
  3. +4
    -4
      priv/shell-completion/zsh/_rebar3
  4. +4
    -4
      src/rebar_prv_eunit.erl

+ 1
- 1
priv/shell-completion/bash/rebar3 View File

@ -92,7 +92,7 @@ _rebar3()
elif [[ ${prev} == escriptize ]] ; then
:
elif [[ ${prev} == eunit ]] ; then
sopts="-c -e -v"
sopts="-c -e -v -d -f -m -s"
lopts="--app --application --cover --dir --error_on_warning --file --module --suite --verbose"
elif [[ ${prev} == help ]] ; then
:

+ 4
- 4
priv/shell-completion/fish/rebar3.fish View File

@ -130,11 +130,11 @@ complete -f -c 'rebar3' -n '__fish_rebar3_needs_command' -a eunit -d "Run EUnit
complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -l app -d "Comma separated list of application test suites to run. Equivalent to `[{application, App}]`"
complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -l application -d "Comma separated list of application test suites to run. Equivalent to `[{application, App}]`"
complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s c -l cover -d "Generate cover data"
complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -l dir -d "Comma separated list of dirs to load tests from. Equivalent to `[{dir, Dir}]`"
complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s d -l dir -d "Comma separated list of dirs to load tests from. Equivalent to `[{dir, Dir}]`"
complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunut' -s e -l error_on_warning -d "Error on invalid test specifications instead of warning"
complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -l file -d "Comma separated list of files to load tests from. Equivalent to `[{file, File}]`"
complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -l module -d "Comma separated list of modules to load tests from. Equivalent to `[{module, Module}]`"
complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -l suite -d "Comma separated list of modules to load tests from. Equivalent to `[{module, Module}]`"
complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s f -l file -d "Comma separated list of files to load tests from. Equivalent to `[{file, File}]`"
complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s m -l module -d "Comma separated list of modules to load tests from. Equivalent to `[{module, Module}]`"
complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s s -l suite -d "Comma separated list of modules to load tests from. Equivalent to `[{module, Module}]`"
complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -s v -l verbose -d "Verbose output"
complete -f -c 'rebar3' -n '__fish_rebar3_using_command eunit' -l suite -d "Lists of test suites to run"

+ 4
- 4
priv/shell-completion/zsh/_rebar3 View File

@ -89,11 +89,11 @@ _rebar3 () {
'(--app)--app[Comma separated list of application test suites to run]:suites' \
'(--application)--application[Comma separated list of application test suites to run]:applications' \
'(-c --cover)'{-c,--cover}'[Generate cover data]' \
'(--dir)--dir[Comma separated list of dirs to load tests from]:dirs' \
'(-d --dir)'{-d,--dir}'[Comma separated list of dirs to load tests from]:dirs' \
'(-e --error_on_warning)'{-e,--error_on_warning}'[Error on invalid test specifications instead of warning]' \
'(--file)--file[Comma separated list of files to load tests from]:files' \
'(--module)--module[Comma separated list of modules to load tests from]:modules' \
'(--suite)--suite[Comma separated list of modules to load tests from]:modules' \
'(-f --file)'{-f,--file}'[Comma separated list of files to load tests from]:files' \
'(-m --module)'{-m,--module}'[Comma separated list of modules to load tests from]:modules' \
'(-s --suite)'{-s,--suite}'[Comma separated list of modules to load tests from]:modules' \
'(-v --verbose)'{-v,--verbose}'[Verbose output]' \
&& ret=0
;;

+ 4
- 4
src/rebar_prv_eunit.erl View File

@ -457,10 +457,10 @@ eunit_opts(_State) ->
[{app, undefined, "app", string, help(app)},
{application, undefined, "application", string, help(app)},
{cover, $c, "cover", boolean, help(cover)},
{dir, undefined, "dir", string, help(dir)},
{file, undefined, "file", string, help(file)},
{module, undefined, "module", string, help(module)},
{suite, undefined, "suite", string, help(module)},
{dir, $d, "dir", string, help(dir)},
{file, $f, "file", string, help(file)},
{module, $m, "module", string, help(module)},
{suite, $s, "suite", string, help(module)},
{verbose, $v, "verbose", boolean, help(verbose)}].
help(app) -> "Comma separated list of application test suites to run. Equivalent to `[{application, App}]`.";

Loading…
Cancel
Save