aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/settings.exp
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@embecosm.com>2022-06-30 19:57:34 +0100
committerMaciej W. Rozycki <macro@embecosm.com>2022-06-30 19:57:34 +0100
commit89555e4ec2195b7b10203befa23ff5e62fba406d (patch)
tree2c7b5303e39d5f76fe5e3f6e1548958d4e9cb448 /gdb/testsuite/gdb.base/settings.exp
parent0b1505c82dc5bb593608bb72c1db0496088f2d25 (diff)
downloadgdb-89555e4ec2195b7b10203befa23ff5e62fba406d.zip
gdb-89555e4ec2195b7b10203befa23ff5e62fba406d.tar.gz
gdb-89555e4ec2195b7b10203befa23ff5e62fba406d.tar.bz2
GDB: Add `NUMBER' completion to `set' integer commands
Fix a completion consistency issue with `set' commands accepting integer values and the special `unlimited' keyword: (gdb) complete print -elements print -elements NUMBER print -elements unlimited (gdb) vs: (gdb) complete set print elements set print elements unlimited (gdb) (there is a space entered at the end of both commands, not shown here) which also means if you strike <Tab> with `set print elements ' input, it will, annoyingly, complete to `set print elements unlimited' right away rather than showing a choice between `NUMBER' and `unlimited'. Add `NUMBER' then as an available completion for such `set' commands: (gdb) complete set print elements set print elements NUMBER set print elements unlimited (gdb) Adjust the testsuite accordingly. Also document the feature in the Completion section of the manual in addition to the Command Options section already there.
Diffstat (limited to 'gdb/testsuite/gdb.base/settings.exp')
-rw-r--r--gdb/testsuite/gdb.base/settings.exp8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/settings.exp b/gdb/testsuite/gdb.base/settings.exp
index dafc5e4..890a2be 100644
--- a/gdb/testsuite/gdb.base/settings.exp
+++ b/gdb/testsuite/gdb.base/settings.exp
@@ -215,8 +215,14 @@ proc test-integer {variant} {
test_gdb_complete_none \
"$set_cmd "
} else {
+ test_gdb_complete_multiple "$set_cmd " "" "" {
+ "NUMBER"
+ "unlimited"
+ }
+ test_gdb_complete_none \
+ "$set_cmd 1"
test_gdb_complete_unique \
- "$set_cmd " \
+ "$set_cmd u" \
"$set_cmd unlimited"
}