]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.tui/resize-one-line.exp
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.tui / resize-one-line.exp
CommitLineData
1d506c26 1# Copyright 2023-2024 Free Software Foundation, Inc.
ee1e9bbb
TV
2
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 3 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16# Check that when showing main (because of lack of current frame) in the src
17# window, resizing to 1 line and back doesn't change the contents of the src
18# window.
19
20tuiterm_env
21
22standard_testfile main-one-line.c
23
24if {[build_executable "failed to prepare" ${testfile} ${srcfile}] == -1} {
25 return -1
26}
27
28Term::clean_restart 24 80 $testfile
29
30if {![Term::enter_tui]} {
31 unsupported "TUI not supported"
32 return
33}
34
35# Check that we have a source box containing main.
36Term::check_box "source box" 0 0 80 15
37Term::check_region_contents "src window shows main" 0 0 80 15 "main"
38
39# Resize to a single line.
40Term::resize 1 80 0
41Term::wait_for ""
42
43# Resize back to the previous size.
44Term::resize 24 80 0
45
46# Check that we still have a source box containing main.
47with_test_prefix "after resizing" {
48 gdb_assert { [Term::wait_for_region_contents 0 0 80 15 "main"] } \
49 "src window shows main"
50}