* [pushed] [gdb/testsuite] Fix gdb.tui/long-prompt.exp with read1
@ 2023-06-13 11:21 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2023-06-13 11:21 UTC (permalink / raw)
To: gdb-patches
When running test-case gdb.tui/long-prompt.exp with check-read1, we get:
...
(gdb) FAIL: gdb.tui/long-prompt.exp: prompt size == width + 1: \
end of screen: at last line
...
The problem is in these commands:
...
Term::command "echo \\n"
Term::command "echo \\n"
Term::command "echo \\n"
Term::command "echo \\n"
...
The last one makes the terminal scroll, and the scrolling makes the expected
output match on a different line.
Fix this by replacing the sequence with a single command:
...
Term::command "echo \\n\\n\\n\\n\\n\\n"
...
which avoids scrolling.
Tested on x86_64-linux.
---
gdb/testsuite/gdb.tui/long-prompt.exp | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/gdb/testsuite/gdb.tui/long-prompt.exp b/gdb/testsuite/gdb.tui/long-prompt.exp
index e7249bbfea3..e4e8b75ede0 100644
--- a/gdb/testsuite/gdb.tui/long-prompt.exp
+++ b/gdb/testsuite/gdb.tui/long-prompt.exp
@@ -57,10 +57,7 @@ with_test_prefix "prompt size == width + 1: end of screen" {
}
# Put prompt at last line.
- Term::command "echo \\n"
- Term::command "echo \\n"
- Term::command "echo \\n"
- Term::command "echo \\n"
+ Term::command "echo \\n\\n\\n\\n\\n\\n"
gdb_assert { $Term::_cur_row == 23 } "at last line"
set prompt "123456789A123456789B123456789C123456789D>"
base-commit: 3e543c18b174a6d68277d27f27a98eb9515d20c5
--
2.35.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-13 11:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-13 11:21 [pushed] [gdb/testsuite] Fix gdb.tui/long-prompt.exp with read1 Tom de Vries
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).