This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA: recognize new error messages in test suite



2002-05-10  Jim Blandy  <jimb@redhat.com>

	* gdb.base/printcmds.exp (test_integer_literals_rejected):
	Recognize more detailed error message produced by the macro
	expander's lexical analyzer.
	* lib/gdb.exp (test_print_reject): Same.

Index: gdb/testsuite/gdb.base/printcmds.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/printcmds.exp,v
retrieving revision 1.7
diff -c -r1.7 printcmds.exp
*** gdb/testsuite/gdb.base/printcmds.exp	4 May 2002 15:18:21 -0000	1.7
--- gdb/testsuite/gdb.base/printcmds.exp	10 May 2002 16:18:20 -0000
***************
*** 98,105 ****
      global gdb_prompt
  
      test_print_reject "p 0x" 
!     gdb_test "p ''" "Empty character constant\\."
!     gdb_test "p '''" "Empty character constant\\."
      test_print_reject "p '\\'"
  
      # Note that this turns into "p '\\\'" at gdb's input.
--- 98,105 ----
      global gdb_prompt
  
      test_print_reject "p 0x" 
!     gdb_test "p ''" "(Empty character constant\\.|A character constant must contain at least one character\\.)"
!     gdb_test "p '''" "(Empty character constant\\.|A character constant must contain at least one character\\.)"
      test_print_reject "p '\\'"
  
      # Note that this turns into "p '\\\'" at gdb's input.
Index: gdb/testsuite/lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.15
diff -c -r1.15 gdb.exp
*** gdb/testsuite/lib/gdb.exp	3 Apr 2002 16:17:11 -0000	1.15
--- gdb/testsuite/lib/gdb.exp	10 May 2002 16:18:21 -0000
***************
*** 618,623 ****
--- 618,631 ----
  	    pass "reject $sendthis"
  	    return 1
  	}
+         -re "Unmatched single quote.*$gdb_prompt $" {
+             pass "reject $sendthis"
+             return 1
+         }
+         -re "A character constant must contain at least one character.*$gdb_prompt $" {
+             pass "reject $sendthis"
+             return 1
+         }
  	-re "$expectthis.*$gdb_prompt $" {
  	    pass "reject $sendthis"
  	    return 1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]