tuiterm_env
+standard_testfile tui-long-line.c
+
+if { [build_executable "failed to prepare" $testfile $srcfile] == -1 } {
+ return
+}
+
save_vars { env(LC_ALL) } {
setenv LC_ALL C.UTF-8
# Start terminal.
- Term::clean_restart 24 80
+ Term::clean_restart 24 80 $testfile
# Start TUI.
if {![Term::enter_tui]} {
# Send arrow-right.
send_gdb "\033\[C"
-
- # We need to the arrow-right to be processed by readline, before we
- # send the following ^C. Waiting 1 ms seems to do that.
- after 1
+ # Wait for arrow-right effect.
+ gdb_assert { [Term::wait_for_region_contents 1 5 78 1 \
+ [string_to_regexp " ain (void)"]] } "arrow right"
# Send ^C.
send_gdb "\003"
--- /dev/null
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2025 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+int
+main (void)
+{
+ /* This is a comment that is meant to be longer than the usual 80 characters width of a tuiterm. */
+ return 0;
+}