With test-case gdb.tui/basic.exp and TERM=ansis, I run into (with some logging
added):
...
status line: '<reverse:1><intensity:dim>exec No process (asm) In:
L?? PC: ?? <reverse:0><intensity:normal>'
FAIL: gdb.tui/basic.exp: status window: reverse
...
The status window uses ncurses attribute standout, which can differ between
different terminal settings.
Fix this by making the matching less strict.
Tested on x86_64-linux.
set status_window_line 15
set status [Term::get_line_with_attrs $status_window_line]
-gdb_assert { [regexp "^<reverse:1>$re_noattr*<reverse:0>$" $status] == 1} \
+verbose -log "status line: '$status'"
+
+# The status line uses standout, which may translate to different attributes
+# depending on the terminal settings. Just check for at least one attribute.
+gdb_assert { [regexp "^<.*>exec" $status] == 1 } \
"status window: reverse"