diff options
author | Pedro Alves <palves@redhat.com> | 2019-07-03 16:57:50 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2019-07-03 17:09:16 +0100 |
commit | a994424fa1e80d982644038f1ce6538e247aeed1 (patch) | |
tree | 8b22027e66cc8f4d58193df3a223a8b79628835e /gdb/cli/cli-script.c | |
parent | 3d9be6f531db395a5ad940ef06e56d849f4de646 (diff) | |
download | gdb-a994424fa1e80d982644038f1ce6538e247aeed1.zip gdb-a994424fa1e80d982644038f1ce6538e247aeed1.tar.gz gdb-a994424fa1e80d982644038f1ce6538e247aeed1.tar.bz2 |
Fix latent bug in test_gdb_complete_cmd_multiple
A following patch will add the following to a testcase:
test_gdb_completion_offers_commands "| "
And that tripped on a latent testsuite bug:
(gdb) | PASS: gdb.base/shell.exp: tab complete "| "
^CQuit
(gdb) complete |
| !
| +
PASS: gdb.base/shell.exp: cmd complete "| "
| *** List may be truncated, max-completions reached. ***
(gdb) FAIL: gdb.base/shell.exp: set max-completions 200
set max-completions 200
The issue is that "|" ends up as part of a regexp, and "|" in regexps
has a special meaning...
Fix this with string_to_regexp.
gdb/testsuite/ChangeLog:
2019-07-03 Pedro Alves <palves@redhat.com>
* lib/completion-support.exp (test_gdb_complete_cmd_multiple): Use
string_to_regexp.
Diffstat (limited to 'gdb/cli/cli-script.c')
0 files changed, 0 insertions, 0 deletions