]>
Commit | Line | Data |
---|---|---|
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 | ||
20 | tuiterm_env | |
21 | ||
22 | standard_testfile main-one-line.c | |
23 | ||
24 | if {[build_executable "failed to prepare" ${testfile} ${srcfile}] == -1} { | |
25 | return -1 | |
26 | } | |
27 | ||
28 | Term::clean_restart 24 80 $testfile | |
29 | ||
30 | if {![Term::enter_tui]} { | |
31 | unsupported "TUI not supported" | |
32 | return | |
33 | } | |
34 | ||
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" | |
38 | ||
39 | # Resize to a single line. | |
40 | Term::resize 1 80 0 | |
41 | Term::wait_for "" | |
42 | ||
43 | # Resize back to the previous size. | |
44 | Term::resize 24 80 0 | |
45 | ||
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" | |
50 | } |