diff options
author | Fred Fish <fnf@specifix.com> | 2003-12-09 18:19:20 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 2003-12-09 18:19:20 +0000 |
commit | a1dea79abed02b14c9984aecc843f1295366e54c (patch) | |
tree | ef2d6de68f91bb2ad567f20f2d21bd9016dbcbef /gdb/testsuite/gdb.base/completion.exp | |
parent | 5533419b3dc29dea299870ccddd08fcb77187465 (diff) | |
download | gdb-a1dea79abed02b14c9984aecc843f1295366e54c.zip gdb-a1dea79abed02b14c9984aecc843f1295366e54c.tar.gz gdb-a1dea79abed02b14c9984aecc843f1295366e54c.tar.bz2 |
Committed after testing and independent approval/endorsement.
2003-12-09 Fred Fish <fnf@redhat.com>
* gdb.base/break.c (marker1, marker2, marker3, marker4): Move
functions to break1.c and leave prototypes behind. Add more
"set breakpoint NN here" comments.
* gdb.base/break1.c: New file.
* gdb.base/break.exp: Handle compiling test case from multiple
source files and change source file references as needed.
* gdb.base/completion.exp: Ditto.
* gdb.base/condbreak.exp: Ditto.
* gdb.base/define.exp: Ditto.
* gdb.base/ena-dis-br.exp: Ditto.
* gdb.base/info-proc.exp: Ditto.
* gdb.base/maint.exp: Ditto.
* gdb.base/until.exp: Ditto.
* gdb.base/condbreak.exp: Use bp_locationNN variables instead of
hardcoded line numbers.
* gdb.base/define.exp: Ditto.
* gdb.base/ena-dis-br.exp: Ditto.
* gdb.base/maint.exp: Ditto.
* gdb.base/until.exp: Ditto.
* gdb.base/completion.exp: Use "break1" for completion tests since
"break" is no longer a unique prefix.
Diffstat (limited to 'gdb/testsuite/gdb.base/completion.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/completion.exp | 68 |
1 files changed, 39 insertions, 29 deletions
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp index a1ff58a..9f5435d 100644 --- a/gdb/testsuite/gdb.base/completion.exp +++ b/gdb/testsuite/gdb.base/completion.exp @@ -38,8 +38,8 @@ # "info ajksdlfk " no completions # "info" " " # "info " ambiguous (all info commands) -# "p \"break" unambiguous (completes to filename "break.c") -# "p \"break." unambiguous (should complete to "break.c" but does not, +# "p \"break1" unambiguous (completes to filename "break1.c") +# "p \"break1." unambiguous (should complete to "break1.c" but does not, # due to readline limitations) # "p 'a" ambiguous (all symbols starting with a) # "p b-a" ambiguous (all symbols starting with a) @@ -64,9 +64,19 @@ set bug_id 0 set testfile "break" set srcfile ${testfile}.c +set srcfile1 ${testfile}1.c set binfile ${objdir}/${subdir}/${testfile} -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-w}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." + +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug additional_flags=-w}] != "" } { + gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." +} + +if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug additional_flags=-w}] != "" } { + gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." +} + +if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug additional_flags=-w}] != "" } { + gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." } if [get_compiler_info ${binfile}] { @@ -351,61 +361,61 @@ gdb_expect { } -send_gdb "p \"break\t" +send_gdb "p \"break1\t" sleep 1 gdb_expect { - -re "^p \"break\\\x07$"\ + -re "^p \"break1\\\x07$"\ { send_gdb "\n" gdb_expect { - -re ".*$gdb_prompt $" { fail "complete 'p \"break'"} - timeout {fail "(timeout) complete 'p \"break'"} + -re ".*$gdb_prompt $" { fail "complete 'p \"break1'"} + timeout {fail "(timeout) complete 'p \"break1'"} } } - -re "^p \"break\\.c\"$"\ + -re "^p \"break1\\.c\"$"\ { send_gdb "\n" gdb_expect { - -re ".*$gdb_prompt $" { pass "complete 'p \"break'"} - timeout {fail "(timeout) complete 'p \"break'"} + -re ".*$gdb_prompt $" { pass "complete 'p \"break1'"} + timeout {fail "(timeout) complete 'p \"break1'"} } } - -re "^p \"break.*$" + -re "^p \"break1.*$" { send_gdb "\n" gdb_expect { - -re ".*$gdb_prompt $" { fail "complete 'p \"break'"} - timeout {fail "(timeout) complete 'p \"break'"} + -re ".*$gdb_prompt $" { fail "complete 'p \"break1'"} + timeout {fail "(timeout) complete 'p \"break1'"} } } - -re ".*$gdb_prompt $" { fail "complete 'p \"break'" } - timeout { fail "(timeout) complete 'p \"break'" } + -re ".*$gdb_prompt $" { fail "complete 'p \"break1'" } + timeout { fail "(timeout) complete 'p \"break1'" } } setup_xfail "*-*-*" -send_gdb "p \"break.\t" +send_gdb "p \"break1.\t" sleep 1 gdb_expect { - -re "^p \"break\\.\\\x07$"\ + -re "^p \"break1\\.\\\x07$"\ { send_gdb "\n" gdb_expect { - -re ".*$gdb_prompt $" { fail "complete 'p \"break.'"} - timeout {fail "(timeout) complete 'p \"break.'"} + -re ".*$gdb_prompt $" { fail "complete 'p \"break1.'"} + timeout {fail "(timeout) complete 'p \"break1.'"} } } - -re "^p \"break\\.c\"$"\ + -re "^p \"break1\\.c\"$"\ { send_gdb "\n" gdb_expect { - -re ".*$gdb_prompt $" { pass "complete 'p \"break.'"} - timeout {fail "(timeout) complete 'p \"break.'"} + -re ".*$gdb_prompt $" { pass "complete 'p \"break1.'"} + timeout {fail "(timeout) complete 'p \"break1.'"} } } - -re "^p \"break\\..*$" + -re "^p \"break1\\..*$" { send_gdb "\n" gdb_expect { - -re ".*$gdb_prompt $" { fail "complete 'p \"break.'"} - timeout {fail "(timeout) complete 'p \"break.'"} + -re ".*$gdb_prompt $" { fail "complete 'p \"break1.'"} + timeout {fail "(timeout) complete 'p \"break1.'"} } } - -re ".*$gdb_prompt $" { fail "complete 'p \"break.'" } - timeout { fail "(timeout) complete 'p \"break.'" } + -re ".*$gdb_prompt $" { fail "complete 'p \"break1.'" } + timeout { fail "(timeout) complete 'p \"break1.'" } } send_gdb "p 'a\t" @@ -682,7 +692,7 @@ gdb_expect { -re "marker1.*$gdb_prompt info func marker$"\ { send_gdb "\n" gdb_expect { - -re "All functions matching regular expression \"marker\":.*File.*break.c:\r\nint marker1\\((void|)\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long int\\);.*$gdb_prompt $"\ + -re "All functions matching regular expression \"marker\":.*File.*break1.c:\r\nint marker1\\((void|)\\);\r\nint marker2\\(int\\).*marker3\\(char.*char.*\\).*marker4\\(long int\\);.*$gdb_prompt $"\ { pass "complete 'info func marke'"} -re ".*$gdb_prompt $" { fail "complete 'info func marke'"} timeout {fail "(timeout) complete 'info func marke'"} |