From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 6/6] [gdb/testsuite] Use ansi-for-tui in tuiterm
Date: Mon, 22 May 2023 15:15:45 +0200 [thread overview]
Message-ID: <20230522131545.12291-8-tdevries@suse.de> (raw)
In-Reply-To: <20230522131545.12291-1-tdevries@suse.de>
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(-)
diff --git a/gdb/testsuite/gdb.tui/wrap-line.exp b/gdb/testsuite/gdb.tui/wrap-line.exp
index 4587517504c..82e3167a210 100644
--- a/gdb/testsuite/gdb.tui/wrap-line.exp
+++ b/gdb/testsuite/gdb.tui/wrap-line.exp
@@ -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
diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp
index bb0681f2034..0024cd85ee7 100644
--- a/gdb/testsuite/lib/tuiterm.exp
+++ b/gdb/testsuite/lib/tuiterm.exp
@@ -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
}
--
2.35.3
prev parent reply other threads:[~2023-05-22 13:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-22 13:15 [PATCH 0/6] [gdb/tui] Introduce ansi-for-tui Tom de Vries
2023-05-22 13:15 ` [PATCH 1/6] [gdb/testsuite] Use TERM=dummy in gdb.tui/tuiterm.exp Tom de Vries
2023-05-22 13:15 ` [PATCH] [gdb/tui] Add set style tui-status-window Tom de Vries
2023-05-22 13:47 ` Eli Zaretskii
2023-05-22 14:22 ` Tom de Vries
2023-05-22 15:50 ` Eli Zaretskii
2023-05-22 13:15 ` [PATCH 2/6] [gdb/testsuite] Factor out Term::_wrap_cursor Tom de Vries
2023-05-22 13:15 ` [PATCH 3/6] [gdb/contrib] Add ansi-for-tui.sh Tom de Vries
2023-05-22 13:15 ` [PATCH 4/6] [gdb/testsuite] Make ansi-for-tui available in with_tuiterm Tom de Vries
2023-05-22 13:15 ` [PATCH 5/6] [gdb/testsuite] Implement the newline glitch in tuiterm Tom de Vries
2023-05-22 13:15 ` Tom de Vries [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230522131545.12291-8-tdevries@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).