public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug testsuite/30451] New: [gdb/testsuite] Implement newline glitch in tuiterm
Date: Tue, 16 May 2023 11:39:14 +0000	[thread overview]
Message-ID: <bug-30451-4717@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=30451

            Bug ID: 30451
           Summary: [gdb/testsuite] Implement newline glitch in tuiterm
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: testsuite
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

An idea suggested here (
https://sourceware.org/pipermail/gdb-patches/2023-May/199478.html ) is to
implement the newline glitch in tuiterm.

I wrote a script:
...
$ cat gen-ansi-xenl.sh
#!/bin/sh

o=ansi
n=ansi-xenl

f=$n.txt
infocmp -1 $o > $f
echo -e "\txenl," >> $f
description="ansi/pc-term compatible with color and newline glitch"

sed -i "s%^$o|%$n|%" $f

sed -i "s%|.*,$%|$description,%" $f

tic $f
...
that generates:
...
$ find ~/.terminfo/ -type f
/home/vries/.terminfo/a/ansi-xenl
...
and allows us to use TERM=ansi-xenl.

I changed this in with_tuiterm:
...
-           setenv TERM ansi
+           setenv TERM ansi-xenl
...
and ran the TUI tests (gdb.tui/*.exp and gdb.python/tui*.exp).

The only fall-out of this was:
...
FAIL: gdb.tui/wrap-line.exp: width-hard-coded: $gdb_width == [expr
$readline_width + 1]
FAIL: gdb.tui/wrap-line.exp: width-auto-detected: $gdb_width == [expr
$readline_width + 1]
...
which is expected, because the test has hardcoded expections about TERM=ansi,
so without xenl, and can trivially be fixed by updating the assert.

Surprisingly, this doesn't seem to be causing problems with any of the other
test-cases (we'd expect problems because we tell curses that tuiterm has the
glitch, but we haven't implemented it yet).

Apparently curses/gdb doesn't care too much about this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2023-05-16 11:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16 11:39 vries at gcc dot gnu.org [this message]
2023-05-16 13:54 ` [Bug testsuite/30451] " vries at gcc dot gnu.org
2023-05-18 22:43 ` tromey at sourceware dot org
2023-05-22 13:16 ` vries at gcc dot gnu.org
2023-05-22 13:27 ` vries at gcc dot gnu.org
2023-05-22 13:56 ` vries at gcc dot gnu.org

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=bug-30451-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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).