Add translations for various sub-directories
[binutils-gdb.git] / gdb / testsuite / gdb.tui / resize-one-line.exp
blobbdb7e01a99113ca9e3486f407190fb493fea5241
1 # Copyright 2023-2024 Free Software Foundation, Inc.
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.
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.
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/>.
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.
20 tuiterm_env
22 standard_testfile main-one-line.c
24 if {[build_executable "failed to prepare" ${testfile} ${srcfile}] == -1} {
25     return -1
28 Term::clean_restart 24 80 $testfile
30 if {![Term::enter_tui]} {
31     unsupported "TUI not supported"
32     return
35 # Check that we have a source box containing main.
36 Term::check_box "source box" 0 0 80 15
37 Term::check_region_contents "src window shows main" 0 0 80 15 "main"
39 # Resize to a single line.
40 Term::resize 1 80 0
41 Term::wait_for ""
43 # Resize back to the previous size.
44 Term::resize 24 80 0
46 # Check that we still have a source box containing main.
47 with_test_prefix "after resizing" {
48     gdb_assert { [Term::wait_for_region_contents  0 0 80 15 "main"] } \
49         "src window shows main"