aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-09-24 16:07:42 +0000
committerAndrew Cagney <cagney@redhat.com>2002-09-24 16:07:42 +0000
commit9dd34b2bcf288eece46bcf739bd9bfc64b438f5d (patch)
tree12dc546a6750fd15629eee2b2892536f05266eb0 /gdb
parent6b3ac70943f1b38c2f3e50e90752bdbe9b35bdeb (diff)
downloadgdb-9dd34b2bcf288eece46bcf739bd9bfc64b438f5d.zip
gdb-9dd34b2bcf288eece46bcf739bd9bfc64b438f5d.tar.gz
gdb-9dd34b2bcf288eece46bcf739bd9bfc64b438f5d.tar.bz2
2002-09-24 Andrew Cagney <ac131313@redhat.com>
* gdb.gdb/complaints.exp (test_initial_complaints): Rename test_isolated_complaints. (test_empty_complaint): New function. (test_empty_complaints): New function. Check no output when no complaints.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog8
-rw-r--r--gdb/testsuite/gdb.gdb/complaints.exp40
2 files changed, 46 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 37d3d6b..954b946 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2002-09-24 Andrew Cagney <ac131313@redhat.com>
+
+ * gdb.gdb/complaints.exp (test_initial_complaints): Rename
+ test_isolated_complaints.
+ (test_empty_complaint): New function.
+ (test_empty_complaints): New function. Check no output when no
+ complaints.
+
2002-09-19 Jim Blandy <jimb@redhat.com>
* gdb.base/charset.exp, gdb.base/charset.c: New files.
diff --git a/gdb/testsuite/gdb.gdb/complaints.exp b/gdb/testsuite/gdb.gdb/complaints.exp
index 159a8ca..3d3426f 100644
--- a/gdb/testsuite/gdb.gdb/complaints.exp
+++ b/gdb/testsuite/gdb.gdb/complaints.exp
@@ -101,7 +101,7 @@ proc setup_test { executable } {
return 0
}
-proc test_isolated_complaints { } {
+proc test_initial_complaints { } {
global gdb_prompt
@@ -233,6 +233,41 @@ proc test_short_complaints { } {
return 0
}
+# Check that nothing comes out when there haven't been any real
+# complaints. Note that each test is really checking the previous
+# command.
+
+proc test_empty_complaint { cmd msg } {
+ global gdb_prompt
+ send_gdb $cmd
+ gdb_expect {
+ -re "\r\n\r\n$gdb_prompt " {
+ fail $msg
+ }
+ "\r\n$gdb_prompt" {
+ pass $msg
+ }
+ timeout {
+ fail "$msg (timeout)"
+ }
+ }
+
+}
+
+proc test_empty_complaints { } {
+
+ test_empty_complaint "call clear_complaints(&symfile_complaints,0,0)\n" \
+ "empty non-verbose non-noisy clear"
+ test_empty_complaint "call clear_complaints(&symfile_complaints,1,0)\n" \
+ "empty verbose non-noisy clear"
+ test_empty_complaint "call clear_complaints(&symfile_complaints,1,1)\n" \
+ "empty verbose noisy clear"
+ test_empty_complaint "call clear_complaints(&symfile_complaints,0,1)\n" \
+ "empty non-verbose noisy clear"
+
+ return 0
+}
+
# Find a pathname to a file that we would execute if the shell was asked
# to run $arg using the current PATH.
@@ -274,9 +309,10 @@ if {$setup_result <0} then {
return -1
}
-test_isolated_complaints
+test_initial_complaints
test_serial_complaints
test_short_complaints
+test_empty_complaints
gdb_exit;
catch "remote_file host delete $file";