From 002a5a45531aed3fd5d70119df85361e52827030 Mon Sep 17 00:00:00 2001 From: Igor Murzov Date: Sun, 17 Jul 2011 18:14:33 +0400 Subject: [PATCH] kcov: Add --path-strip-level option (added in kcov-v7) Also provide more meaningful completions for --sort-type option. And improve test. --- completions/kcov | 5 +++-- test/lib/completions/kcov.exp | 6 ++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/completions/kcov b/completions/kcov index 3bad12d8..de421ff9 100644 --- a/completions/kcov +++ b/completions/kcov @@ -11,14 +11,15 @@ _kcov() return 0 ;; --sort-type|-s) - COMPREPLY=( $( compgen -W 'f p' -- "$cur" ) ) + COMPREPLY=( $( compgen -W 'filename percentage' -- "$cur" ) ) return 0 ;; --include-path|--exclude-path) _filedir 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 return 0 ;; diff --git a/test/lib/completions/kcov.exp b/test/lib/completions/kcov.exp index f2a50318..c39f53e7 100644 --- a/test/lib/completions/kcov.exp +++ b/test/lib/completions/kcov.exp @@ -17,10 +17,8 @@ assert_complete_any "kcov " sync_after_int -set test "-- should complete all long options" -set options [list --help --pid= --sort-type= --limits= --title= --include-path=\ - --exclude-path= --include-pattern= --exclude-pattern=] -assert_complete $options "kcov --" $test +set test "--exclude-patter should complete \"--exclude-pattern=\"" +assert_complete "--exclude-pattern=" "kcov --exclude-patter" $test -nospace sync_after_int