Use CXXCOMPILE in gold/testsuite/Makefile for c++ testcases
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.tui / empty.exp
CommitLineData
b811d2c2 1# Copyright 2019-2020 Free Software Foundation, Inc.
2b1d00c2
TT
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# Test TUI resizing with empty windows.
17
8c74a764 18tuiterm_env
2b1d00c2
TT
19
20standard_testfile
21
22Term::clean_restart 24 80
23
24if {![Term::enter_tui]} {
25 unsupported "TUI not supported"
26}
27
28# Each entry describes a layout. It has these items:
29# 1. Layout name
30# 2. Test name
31# 3. List of boxes in 80x24 mode
32# 4. List of boxes in 90x40 mode
33# 5. List of test name and text for the empty window
34set layouts {
3d979945 35 {src src {{0 0 80 15}} {{0 0 90 26}}
2b1d00c2 36 {{"no source" "No Source Available"}}}
3d979945 37 {regs src-regs {{0 0 80 7} {0 6 80 9}} {{0 0 90 13} {0 12 90 13}}
2b1d00c2
TT
38 {
39 {"no source" "No Source Available"}
40 {"no regs" "Register Values Unavailable"}
41 }}
3d979945 42 {asm asm {{0 0 80 13}} {{0 0 90 26}}
45e42163
TT
43 {
44 {"no asm" "No Assembly Available"}
45 }}
3d979945 46 {regs asm-regs {{0 0 80 7} {0 6 80 9}} {{0 0 90 13} {0 12 90 13}}
2b1d00c2
TT
47 {
48 {"no asm" "No Assembly Available"}
49 {"no regs" "Register Values Unavailable"}
50 }}
3d979945 51 {split split {{0 0 80 6} {0 5 80 8}} {{0 0 90 13} {0 12 90 13}}
2b1d00c2
TT
52 {
53 {"no source" "No Source Available"}
54 {"no asm" "No Assembly Available"}
55 }}
3d979945 56 {regs split-regs {{0 0 80 6} {0 5 80 8}} {{0 0 90 13} {0 12 90 13}}
2b1d00c2
TT
57 {
58 {"no asm" "No Assembly Available"}
59 {"no regs" "Register Values Unavailable"}
60 }}
61}
62
63# Helper function to verify a list of boxes.
64proc check_boxes {boxes} {
65 set boxno 1
66 foreach box $boxes {
2b1d00c2
TT
67 eval Term::check_box [list "box $boxno"] $box
68 incr boxno
69 }
70}
71
72# Helper function to verify text.
73proc check_text {text_list} {
74 set text [Term::get_all_lines]
75 foreach item $text_list {
76 lassign $item testname check
45e42163
TT
77 if {![gdb_assert {[regexp -- $check $text]} $testname]} {
78 Term::dump_screen
79 }
2b1d00c2
TT
80 }
81}
82
83foreach layout $layouts {
84 lassign $layout name testname small_boxes large_boxes text_list
85
86 with_test_prefix $testname {
87 Term::command "layout $name"
88 with_test_prefix 80x24 {
89 check_boxes $small_boxes
90 check_text $text_list
91 }
92
3df505f6
TT
93 Term::resize 40 90
94 with_test_prefix 90x40 {
95 check_boxes $large_boxes
96 check_text $text_list
97 }
98 Term::resize 24 80
2b1d00c2
TT
99 }
100}
This page took 0.157878 seconds and 4 git commands to generate.