aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.stabs
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2023-11-29 16:10:46 +0000
committerAndrew Burgess <aburgess@redhat.com>2023-12-08 18:06:27 +0000
commitcff71358132db440b82747707b3c7c99efca6670 (patch)
treecee69b4345aed3217e0691c07ee19a7e286274ca /gdb/testsuite/gdb.stabs
parente59d0ad9bf8dfc4002835c8eee9e70e951c63d64 (diff)
downloadbinutils-cff71358132db440b82747707b3c7c99efca6670.zip
binutils-cff71358132db440b82747707b3c7c99efca6670.tar.gz
binutils-cff71358132db440b82747707b3c7c99efca6670.tar.bz2
gdb/testsuite: tighten up some end-of-line patterns
Following on from the previous commit, I searched the testsuite for places where we did: set eol "<some pattern>" in most cases the <some pattern> could be replaced with "\r\n" though in the stabs test I've switched to using the multi_line proc as that seemed like a better choice. In gdb.ada/info_types.exp I did need to add an extra use of $eol as the previous pattern would match multiple newlines, and in this one place we were actually expecting to match multiple newlines. The tighter pattern only matches a single newline, so we now need to be explicit when multiple newlines are expected -- I think this is a good thing. All the tests are still passing for me after these changes. Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/testsuite/gdb.stabs')
-rw-r--r--gdb/testsuite/gdb.stabs/exclfwd.exp20
1 files changed, 11 insertions, 9 deletions
diff --git a/gdb/testsuite/gdb.stabs/exclfwd.exp b/gdb/testsuite/gdb.stabs/exclfwd.exp
index a6e6ff8..7492dc5 100644
--- a/gdb/testsuite/gdb.stabs/exclfwd.exp
+++ b/gdb/testsuite/gdb.stabs/exclfwd.exp
@@ -35,19 +35,21 @@ if {![runto_main]} {
get_debug_format
-set eol "\[ \t\]*\[\n\r\]+"
-
-gdb_test "ptype v1" "type = struct a {$eol
- int x;$eol
- int y;$eol
-}"
+gdb_test "ptype v1" \
+ [multi_line \
+ "type = struct a {" \
+ " int x;" \
+ " int y;" \
+ "}"]
if {[test_debug_format "stabs"]} {
setup_kfail "gdb/1602" *-*-*
}
-gdb_test "ptype v2" "type = struct a {$eol
- const char .c;$eol
-}"
+gdb_test "ptype v2" \
+ [multi_line \
+ "type = struct a {" \
+ " const char .c;" \
+ "}"]
if {[test_debug_format "stabs"]} {
setup_kfail "gdb/1603" *-*-*