From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id A7E353857C44 for ; Mon, 22 May 2023 13:15:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A7E353857C44 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id D3EEE21C83; Mon, 22 May 2023 13:15:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1684761344; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3soHbfzD5FU2SMaB9oKQ/sYz/RUqqblowy7Ue+BP8G4=; b=EJ8Cuo1ymdL9/a0xW9O8Ys/z0194HPcXbKExGR+YFQBMF/Qpx5e+h26gooAB29sInqivJ5 +uJ3dgUakYoF60Ztz8djtodqEd0oH1TFLxHAqWlJ6S6daYhbEDKE3LLU0qsFsN3gKU3gYf XMjlT6L2rM84o1nUp9WCSbSuQAbhrXk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1684761344; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3soHbfzD5FU2SMaB9oKQ/sYz/RUqqblowy7Ue+BP8G4=; b=hoA8Ibt1rccDXH1x7Xglj93p/hjQzVvD5HCEb662IFJHvK0b0em38Hn0JR586DqBEb2oph 23GmVcKzCOoVPKCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id BDF63139F5; Mon, 22 May 2023 13:15:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id qCxdLQBra2RvdAAAMHmgww (envelope-from ); Mon, 22 May 2023 13:15:44 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 6/6] [gdb/testsuite] Use ansi-for-tui in tuiterm Date: Mon, 22 May 2023 15:15:45 +0200 Message-Id: <20230522131545.12291-8-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230522131545.12291-1-tdevries@suse.de> References: <20230522131545.12291-1-tdevries@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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