From: Tom de Vries Date: Fri, 8 Aug 2025 11:51:00 +0000 (+0200) Subject: [gdb/testsuite] Fix gdb.tui/main-2.exp for TERM=ansis X-Git-Tag: gdb-17-branchpoint~355 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3aeec96467367a1139e877f679117beaccba084c;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Fix gdb.tui/main-2.exp for TERM=ansis When running test-case gdb.tui/main-2.exp with TERM=ansis, I get: ... screen line 6: 'B+> 21 return 0; ' FAIL: gdb.tui/main-2.exp: highlighted line in middle of source window ... The test tries to check the highlighting of the source line, but also gets the part with the line number, which makes it more complicated to parse. Fix this by getting just the part with the source line: ... screen line 6: ' return 0; \ ' ... Tested on x86_64-linux. --- diff --git a/gdb/testsuite/gdb.tui/main-2.exp b/gdb/testsuite/gdb.tui/main-2.exp index 71ad03b73fc..14a7cb1e5ac 100644 --- a/gdb/testsuite/gdb.tui/main-2.exp +++ b/gdb/testsuite/gdb.tui/main-2.exp @@ -41,7 +41,7 @@ if {![Term::enter_tui]} { set line " return 0;" set nr [gdb_get_line_number $line] -set screen_line [Term::get_string_with_attrs 6 1 79] +set screen_line [Term::get_string_with_attrs 6 11 79] verbose -log "screen line 6: '$screen_line'" -gdb_assert { [regexp "$nr $line" $screen_line] } \ +gdb_assert { [regexp "$line" $screen_line] } \ "highlighted line in middle of source window"