summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--completions/cppcheck2
-rw-r--r--test/lib/completions/cppcheck.exp10
2 files changed, 11 insertions, 1 deletions
diff --git a/completions/cppcheck b/completions/cppcheck
index cb15f730..c24beb2b 100644
--- a/completions/cppcheck
+++ b/completions/cppcheck
@@ -11,7 +11,7 @@ _cppcheck()
_filedir
return
;;
- -D*|--rule|--suppress|--template)
+ -D|--rule|--suppress|--template)
return
;;
--enable)
diff --git a/test/lib/completions/cppcheck.exp b/test/lib/completions/cppcheck.exp
index 66caf27d..4acd709a 100644
--- a/test/lib/completions/cppcheck.exp
+++ b/test/lib/completions/cppcheck.exp
@@ -12,8 +12,18 @@ setup
assert_complete_any "cppcheck "
+sync_after_int
+
+
+assert_complete_any "cppcheck -"
+sync_after_int
+
+
+assert_complete_any "cppcheck -DFOO=BAR "
+sync_after_int
+assert_no_complete "cppcheck -D "
sync_after_int