diff options
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/break1.c | 17 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/completion.exp | 8 |
3 files changed, 31 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 0bdd094..6e3731e 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2012-12-07 Tom Tromey <tromey@redhat.com> + * gdb.base/break1.c (enum some_enum, union some_union): New. + (some_enum_global, some_union_global, some_value): New globals. + * gdb.base/completion.exp: Add tag completion tests. + +2012-12-07 Tom Tromey <tromey@redhat.com> + * gdb.base/completion.exp: Add tests for ptype and whatis completion. diff --git a/gdb/testsuite/gdb.base/break1.c b/gdb/testsuite/gdb.base/break1.c index af4f2b0..1f0654e 100644 --- a/gdb/testsuite/gdb.base/break1.c +++ b/gdb/testsuite/gdb.base/break1.c @@ -29,6 +29,23 @@ struct some_struct struct some_struct values[50]; +/* Some definitions for tag completion. */ +enum some_enum { VALUE }; + +enum some_enum some_enum_global; + +union some_union +{ + int f1; + double f2; +}; + +union some_union some_union_global; + +/* A variable with a name "similar" to the above struct, to test that + tag completion works ok. */ +int some_variable; + /* The following functions do nothing useful. They are included simply as places to try setting breakpoints at. They are explicitly "one-line functions" to verify that this case works diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp index c8edc98..006670d 100644 --- a/gdb/testsuite/gdb.base/completion.exp +++ b/gdb/testsuite/gdb.base/completion.exp @@ -700,6 +700,14 @@ gdb_test "complete sav" "save" "test non-deprecated completion" gdb_test "complete save-t" "save-tracepoints" "test deprecated completion" +# +# Tag name completion. +# + +gdb_test "complete ptype struct some_" "ptype struct some_struct" +gdb_test "complete ptype enum some_" "ptype enum some_enum" +gdb_test "complete ptype union some_" "ptype union some_union" + # Restore globals modified in this test... set timeout $oldtimeout1 |