diff options
author | Tom de Vries <tdevries@suse.de> | 2023-05-22 12:02:43 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-05-22 12:02:43 +0200 |
commit | 5a8f5960fd8fc5136fc24ddaf08a25c73f9c8329 (patch) | |
tree | 6d6c4c2f15f1bb277a8e719b3403443e95c8e2c2 /gdb/testsuite/gdb.tui/basic.exp | |
parent | a01399ff21e35422868c3853a31811c301a73883 (diff) | |
download | fsf-binutils-gdb-5a8f5960fd8fc5136fc24ddaf08a25c73f9c8329.zip fsf-binutils-gdb-5a8f5960fd8fc5136fc24ddaf08a25c73f9c8329.tar.gz fsf-binutils-gdb-5a8f5960fd8fc5136fc24ddaf08a25c73f9c8329.tar.bz2 |
[gdb/testsuite] Add Term::get_line_with_attrs
Add a new proc Term::get_line_with_attrs, similar to Term::get_line, that
annotates a tuiterm line with the active attributes.
For instance, the line representing the TUI status window with attribute mode
standout looks like this with Term::get_line:
...
exec No process In: ... L?? PC: ??
...
but like this with Term::get_line_with_attrs:
...
<reverse:1>exec No process In: ... L?? PC: ?? <reverse:0>
...
Also add Term::dump_screen_with_attrs, a Term::dump_screen variant that uses
Term::get_line_with_attrs instead of Term::get_line.
Tested by re-running the TUI test-cases (gdb.tui/*.exp and gdb.python/tui*.exp)
on x86_64-linux.
Diffstat (limited to 'gdb/testsuite/gdb.tui/basic.exp')
-rw-r--r-- | gdb/testsuite/gdb.tui/basic.exp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.tui/basic.exp b/gdb/testsuite/gdb.tui/basic.exp index ec1e994..2c55c2b 100644 --- a/gdb/testsuite/gdb.tui/basic.exp +++ b/gdb/testsuite/gdb.tui/basic.exp @@ -106,3 +106,11 @@ Term::check_contents "split layout contents" \ Term::check_box "source box in split layout" 0 0 80 8 Term::check_box "asm box in split layout" 0 7 80 8 + +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} \ + "status window: reverse" |