From: Tom de Vries Date: Sun, 5 Oct 2025 20:50:09 +0000 (+0200) Subject: [gdb/testsuite, tclint] Fix lib/rust-support.exp X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=593fc394911ee1dade3b6bf05a52f366b575acae;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite, tclint] Fix lib/rust-support.exp --- diff --git a/gdb/tclint.toml b/gdb/tclint.toml index 565dbaae701..128951283e7 100644 --- a/gdb/tclint.toml +++ b/gdb/tclint.toml @@ -47,7 +47,6 @@ exclude = [ "gdb/testsuite/lib/pascal.exp", "gdb/testsuite/lib/perftest.exp", "gdb/testsuite/lib/prelink-support.exp", -"gdb/testsuite/lib/rust-support.exp", "gdb/testsuite/lib/selftest-support.exp", "gdb/testsuite/lib/trace-support.exp", # IGNORE (document reason in trailing comment): diff --git a/gdb/testsuite/lib/rust-support.exp b/gdb/testsuite/lib/rust-support.exp index 94888e93adb..7087e8288b5 100644 --- a/gdb/testsuite/lib/rust-support.exp +++ b/gdb/testsuite/lib/rust-support.exp @@ -16,11 +16,12 @@ # Auxiliary function to set the language to Rust. # The result is 1 (true) for success, 0 (false) for failure. proc set_lang_rust {} { - if [gdb_test_no_output "set language rust"] { + if {[gdb_test_no_output "set language rust"]} { return 0 } - if [gdb_test "show language" ".* source language is \"rust\"." \ - "set language to \"rust\""] { + if {[gdb_test "show language" \ + [string_to_regexp {The current source language is "rust".}] \ + {set language to "rust"}]} { return 0 } return 1