aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1995-03-14 21:25:19 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1995-03-14 21:25:19 +0000
commit4081daa1ed1c7370d33dded34bf716600e1b349f (patch)
treee798f311e52ecea37e3a820052e1332defce68a2 /gdb/testsuite/lib
parent35f37e1e6698cddd6f60e6a67f598700e9937d18 (diff)
downloadgdb-4081daa1ed1c7370d33dded34bf716600e1b349f.zip
gdb-4081daa1ed1c7370d33dded34bf716600e1b349f.tar.gz
gdb-4081daa1ed1c7370d33dded34bf716600e1b349f.tar.bz2
* lib/gdb.exp (gdb_test): Between $pattern and $prompt, expect
only \r\n, not .*. The test can pass .* as the last thing in $pattern if that is what it wants. In addition to providing this flexibility, this change should speed up pattern matching in cases where the pattern already ended with .* (there were a number of them). This change also helps catch bad patterns--in the old scheme the typo "char \*" instead of "char \\*" would pass. Now it is caught. * Many .exp files: Update callers.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/gdb.exp12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index efd0910..f64a0b7 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -50,7 +50,7 @@ proc default_gdb_version {} {
global GDB
global GDBFLAGS
if {[which $GDB] != 0} then {
- set tmp [exec echo "q" | $GDB -nw]
+ set tmp [exec echo "q" | $GDB -nw $GDBFLAGS]
regexp " \[0-9\.\]+" $tmp version
clone_output "[which $GDB] version$version -nw $GDBFLAGS \n"
} else {
@@ -237,7 +237,7 @@ proc gdb_test { args } {
gdb_start
set result -1
}
- -re "$pattern.*$prompt $" {
+ -re "$pattern\r\n$prompt $" {
if ![string match "" $message] then {
pass "$message"
}
@@ -296,9 +296,7 @@ proc gdb_test { args } {
#
# This differs from gdb_test in a few ways: (1) handling of empty
# sendthis (I suspect test_print_accept callers never use this), (2)
-# it tests for the " =" (that could easily be moved to the callers,
-# (3) the pattern must be followed by \r\n and the prompt, not other
-# garbage as in gdb_test (this feature seems kind of worthwhile).
+# it tests for the " =" (that could easily be moved to the callers.
proc test_print_accept { args } {
global prompt
@@ -612,4 +610,6 @@ if ![info exists argv0] then {
}
}
-
+proc skip_chill_tests {} {
+ return ![isnative]
+}