[6/6,gdb/testsuite] Use ansi-for-tui in tuiterm
Commit Message
Use terminfo entry ansi-for-tui instead of ansi in tuiterm.
In contrast to the ansi entry, the ansi-for-tui entry has the xenl capability
set, so set _newline_glitch to 1 to make sure tuiterm matches the newly
advertised behaviour.
Also the new entry makes tui border-kind acs a copy of tui border-kind ascii,
which allows us to remove this from prepare_for_tui:
...
gdb_test_no_output "set tui border-kind ascii"
...
Tested on x86_64-linux.
---
gdb/testsuite/gdb.tui/wrap-line.exp | 4 ++--
gdb/testsuite/lib/tuiterm.exp | 5 ++---
2 files changed, 4 insertions(+), 5 deletions(-)
@@ -93,8 +93,8 @@ proc test_wrap_cli_tui { auto_detected_width } {
gdb_assert { $gdb_width == $::cols } "width"
- # TERM=ansi, so readline hides the last column.
- gdb_assert { $gdb_width == [expr $readline_width + 1] }
+ # TERM=ansi-for-tui, so readline doesn't hide the last column.
+ gdb_assert { $gdb_width == $readline_width }
with_test_prefix cli {
set wrap_width $readline_width
@@ -770,7 +770,7 @@ namespace eval Term {
set _cur_col 0
set _cur_row 0
set _resize_count 0
- set _newline_glitch 0
+ set _newline_glitch 1
_reset_attrs _attrs
_clear_lines 0 $_rows
@@ -901,7 +901,7 @@ namespace eval Term {
save_vars {env(TERM) env(TERMINFO) stty_init} {
setenv TERMINFO $terminfo
- setenv TERM ansi
+ setenv TERM ansi-for-tui
_setup $rows $cols
uplevel $body
@@ -946,7 +946,6 @@ namespace eval Term {
return 0
}
- gdb_test_no_output "set tui border-kind ascii"
gdb_test_no_output "maint set tui-resize-message on"
return 1
}