]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix $eol regexp usage in some test-cases
authorTom de Vries <tdevries@suse.de>
Mon, 11 Dec 2023 16:15:17 +0000 (17:15 +0100)
committerTom de Vries <tdevries@suse.de>
Mon, 11 Dec 2023 16:15:17 +0000 (17:15 +0100)
Commit cff71358132 ("gdb/testsuite: tighten up some end-of-line patterns") replaced:
...
set eol "\[\r\n\]+"
...
with the more strict:
...
set eol "\r\n"
...
in a few test-cases, but didn't update all uses of eol accordingly.

Fix this in three gdb.ada test-cases.

Tested on x86_64-linux.

Approved-By: Andrew Burgess <aburgess@redhat.com>
gdb/testsuite/gdb.ada/catch_assert_if.exp
gdb/testsuite/gdb.ada/catch_ex.exp
gdb/testsuite/gdb.ada/excep_handle.exp

index 9b094d88dc8aea65274f5137cf31ac2abdadc659..3071c4a5e0601b0c3e8d2b0e207cbc9d874dd5f9 100644 (file)
@@ -52,7 +52,7 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/bla.adb]
 set catchpoint_msg \
   "Catchpoint $decimal, failed assertion at $hex in bla \\\(\\\).*at .*bla.adb:$bp_location"
 gdb_test "continue" \
-         "Continuing\.$eol$catchpoint_msg$eol.*STOP" \
+        "Continuing\.$eol$eol$catchpoint_msg$eol.*STOP" \
          "continuing to expected failed assertion"
 
 gdb_test "continue" \
index 22175d83c0727630d45ee857630972563ade60c1..19f743db7a660700a5b322b911a9f8d029b5d64c 100644 (file)
@@ -55,13 +55,13 @@ gdb_test "info break" \
 set catchpoint_msg \
   "Catchpoint $any_nb, CONSTRAINT_ERROR (\\\(ignore C_E\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
 gdb_test "continue" \
-         "Continuing\.$eol$catchpoint_msg$eol.*SPOT1" \
+        "Continuing\.$eol$eol$catchpoint_msg$eol.*SPOT1" \
          "continuing to first exception"
 
 set catchpoint_msg \
   "Catchpoint $any_nb, PROGRAM_ERROR (\\\(foo\\.adb:$decimal explicit raise\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
 gdb_test "continue" \
-         "Continuing\.$eol$catchpoint_msg$eol.*SPOT2" \
+        "Continuing\.$eol$eol$catchpoint_msg$eol.*SPOT2" \
          "continuing to second exception"
 
 ################################################
@@ -108,19 +108,19 @@ gdb_test "info break" \
 set catchpoint_msg \
   "Catchpoint $any_nb, PROGRAM_ERROR (\\\(foo.adb:$decimal explicit raise\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
 gdb_test "continue" \
-         "Continuing\.$eol$catchpoint_msg$eol.*SPOT2" \
+        "Continuing\.$eol$eol$catchpoint_msg$eol.*SPOT2" \
          "continuing to Program_Error exception"
 
 set catchpoint_msg \
   "Catchpoint $any_nb, failed assertion at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
 gdb_test "continue" \
-         "Continuing\.$eol$catchpoint_msg$eol.*SPOT3" \
+        "Continuing\.$eol$eol$catchpoint_msg$eol.*SPOT3" \
          "continuing to failed assertion"
 
 set catchpoint_msg \
   "Catchpoint $any_nb, unhandled CONSTRAINT_ERROR at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
 gdb_test "continue" \
-         "Continuing\.$eol$catchpoint_msg$eol.*SPOT4" \
+        "Continuing\.$eol$eol$catchpoint_msg$eol.*SPOT4" \
          "continuing to unhandled exception"
 
 gdb_test "continue" \
@@ -148,7 +148,7 @@ gdb_test "tcatch exception" \
 set temp_catchpoint_msg \
   "Temporary catchpoint $any_nb, CONSTRAINT_ERROR (\\\(.*\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
 gdb_test "continue" \
-         "Continuing\.$eol$temp_catchpoint_msg$eol.*SPOT1" \
+        "Continuing\.$eol$eol$temp_catchpoint_msg$eol.*SPOT1" \
          "continuing to temporary catchpoint"
 
 with_test_prefix "temporary catchpoint" {
index 590c7fccdec9e0f05b32b4cf75e0054a14c675ec..f1ce24a1682ed9a667c229a72c5a96e606f64bf5 100644 (file)
@@ -55,7 +55,7 @@ gdb_test "catch handlers" \
 # Continue.  The program should stop at first exception handling.
 
 gdb_test "continue" \
-    "Continuing\.$eol$catchpoint_constraint_error_msg" \
+    "Continuing\.$eol$eol$catchpoint_constraint_error_msg" \
     "continuing to first Constraint_Error exception handlers"
 
 # Resume the program's exception.
@@ -66,7 +66,7 @@ gdb_test "continue" \
 # the next exception being raised.
 
 gdb_test "continue" \
-    "Continuing\.$eol$catchpoint_storage_error_msg" \
+    "Continuing\.$eol$eol$catchpoint_storage_error_msg" \
     "continuing and stopping in Storage_Error exception handlers"
 
 gdb_test_no_output "delete 2" \
@@ -85,7 +85,7 @@ gdb_test "catch handlers Program_Error" \
 # Continue, we should not stop at ABORT_SIGNAL but at Program_Error one.
 
 gdb_test "continue" \
-    "Continuing\.$eol$catchpoint_program_error_msg" \
+    "Continuing\.$eol$eol$catchpoint_program_error_msg" \
     "continuing without stopping to Program_Error exception handlers"
 
 gdb_test_no_output \
@@ -101,7 +101,7 @@ gdb_test "catch handlers Storage_Error" \
 # Continue, we should stop at Storage_Error handlers.
 
 gdb_test "continue" \
-    "Continuing\.$eol$catchpoint_storage_error_msg" \
+    "Continuing\.$eol$eol$catchpoint_storage_error_msg" \
     "continuing without stopping to Storage_Error exception handlers"
 
 gdb_test_no_output \
@@ -126,7 +126,7 @@ gdb_test "info breakpoint" "stop only if Global_Var = 2" \
 # Continue, we should not stop at ABORT_SIGNAL but at Program_Error one.
 
 gdb_test "continue" \
-    "Continuing\.$eol$catchpoint_constraint_error_msg" \
+    "Continuing\.$eol$eol$catchpoint_constraint_error_msg" \
     "continuing to second Constraint_Error exception handlers"
 
 gdb_test_no_output \
@@ -148,7 +148,7 @@ gdb_test "catch handlers Program_Error if Global_Var = 4" \
 # the second one.
 
 gdb_test "continue" \
-    "Continuing\.$eol$catchpoint_program_error_msg" \
+    "Continuing\.$eol$eol$catchpoint_program_error_msg" \
     "continuing to Program_Error exception handlers"
 
 # Continue, the program should exit properly.