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.
}
# 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>"