]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
arc: Don't use multiline in arc-disassembler-options.exp test
authorYuriy Kolerov <kolerov93@gmail.com>
Tue, 13 Feb 2024 06:40:22 +0000 (06:40 +0000)
committerShahab Vahedi <shahab@synopsys.com>
Tue, 13 Feb 2024 21:45:18 +0000 (22:45 +0100)
Breaking a TCL string to several lines leads to adding of extra
symbols to the resulting expect string. In turn, this leads to
failing of all test cases in gdb.arch/arc-disassembler-options.exp
testsuite. It's necessary to use multi_line function in such
cases.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.arch/arc-disassembler-options.exp

index 29c7e60b4877037042051fc340aef0356735908a..3a4c52348913fa934341ed4460ee260bf962087d 100644 (file)
@@ -28,10 +28,11 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {}] \
 clean_restart ${objfile}
 
 proc arc_disassemble_test { func insn mesg } {
-    gdb_test "disassemble $func" \
-       "Dump of assembler code for function $func:\r\n\
-       \[^:\]+:\t$insn\r\nEnd of assembler dump\." \
-       $mesg
+    set pass_re [multi_line \
+                       "Dump of assembler code for function $func:" \
+                       "\[^:\]+:\t$insn" \
+                       "End of assembler dump\\."]
+    gdb_test "disassemble $func" $pass_re $mesg
 }
 
 # Verify defaults.