diff options
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.ada/complete.exp | 21 |
2 files changed, 26 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index b1be7e3..a81f9da 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,6 +1,11 @@ 2018-01-04 Joel Brobecker <brobecker@adacore.com> PR gdb/22670 + * gdb.ada/complete.exp: Add "complete break ada" test. + +2018-01-04 Joel Brobecker <brobecker@adacore.com> + + PR gdb/22670 * gdb.ada/info_addr_mixed_case: New testcase. 2018-01-03 Xavier Roirand <roirand@adacore.com> diff --git a/gdb/testsuite/gdb.ada/complete.exp b/gdb/testsuite/gdb.ada/complete.exp index 9b64d15..c1f22c2 100644 --- a/gdb/testsuite/gdb.ada/complete.exp +++ b/gdb/testsuite/gdb.ada/complete.exp @@ -204,3 +204,24 @@ test_gdb_complete "ambiguous_f" \ "p ambiguous_func" test_gdb_complete "ambiguous_func" \ "p ambiguous_func" + +# Perform a test intented to verify the behavior where the number +# of possible completions is very large. The goal is not to verify +# precisely the list returned by the complete command (this depends +# on too many parameters -- targets, compiler version, runtime, etc). +# However, we want to sanity-check each one of them, knowing that +# each result should start with "break ada" and that the proposed +# completion should look like a valid symbol name (in particular, +# no uppercase letters...). + +gdb_test_no_output "set max-completions unlimited" + +set test "complete break ada" +gdb_test_multiple "$test" $test { + -re "^$test$eol\(break ada(\[a-z0-9._\])*$eol\)+$gdb_prompt $" { + pass $test + } + -re "\[A-Z\].*$gdb_prompt $" { + kfail gdb/22670 $test + } +} |