kcov: Add --path-strip-level option (added in kcov-v7)

Also provide more meaningful completions for --sort-type option.
And improve test.
This commit is contained in:
Igor Murzov 2011-07-17 18:14:33 +04:00
parent b68cc0057f
commit 002a5a4553
2 changed files with 5 additions and 6 deletions

View File

@ -11,14 +11,15 @@ _kcov()
return 0 return 0
;; ;;
--sort-type|-s) --sort-type|-s)
COMPREPLY=( $( compgen -W 'f p' -- "$cur" ) ) COMPREPLY=( $( compgen -W 'filename percentage' -- "$cur" ) )
return 0 return 0
;; ;;
--include-path|--exclude-path) --include-path|--exclude-path)
_filedir _filedir
return 0 return 0
;; ;;
--limits|-l|--title|-t|--include-pattern|--exclude-pattern) --limits|-l|--title|-t|--include-pattern|--exclude-pattern|\
--path-strip-level)
# argument required but no completions available # argument required but no completions available
return 0 return 0
;; ;;

View File

@ -17,10 +17,8 @@ assert_complete_any "kcov "
sync_after_int sync_after_int
set test "--<TAB> should complete all long options" set test "--exclude-patter<TAB> should complete \"--exclude-pattern=\""
set options [list --help --pid= --sort-type= --limits= --title= --include-path=\ assert_complete "--exclude-pattern=" "kcov --exclude-patter" $test -nospace
--exclude-path= --include-pattern= --exclude-pattern=]
assert_complete $options "kcov --" $test
sync_after_int sync_after_int