diff options
author | Tom de Vries <tdevries@suse.de> | 2025-08-08 13:51:00 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2025-08-08 13:51:00 +0200 |
commit | a99fc443dc9a825e373e9e25576e0bf611167bc2 (patch) | |
tree | ac0dcc37b1972221b6e475ec4679e45068cb7f6a | |
parent | 3aeec96467367a1139e877f679117beaccba084c (diff) | |
download | binutils-a99fc443dc9a825e373e9e25576e0bf611167bc2.zip binutils-a99fc443dc9a825e373e9e25576e0bf611167bc2.tar.gz binutils-a99fc443dc9a825e373e9e25576e0bf611167bc2.tar.bz2 |
[gdb/testsuite] Fix gdb.tui/basic.exp for TERM=ansis
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.
-rw-r--r-- | gdb/testsuite/gdb.tui/basic.exp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.tui/basic.exp b/gdb/testsuite/gdb.tui/basic.exp index 35c99bd..48b90da 100644 --- a/gdb/testsuite/gdb.tui/basic.exp +++ b/gdb/testsuite/gdb.tui/basic.exp @@ -112,5 +112,9 @@ set re_noattr "\[^<\]" 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" |