From 593fc394911ee1dade3b6bf05a52f366b575acae Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Sun, 5 Oct 2025 22:50:09 +0200 Subject: [PATCH] [gdb/testsuite, tclint] Fix lib/rust-support.exp --- gdb/tclint.toml | 1 - gdb/testsuite/lib/rust-support.exp | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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 -- 2.47.3