| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 
 | # Copyright 2022-2023 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/>.
# Test the "winwidth" command.
tuiterm_env
standard_testfile tui-layout.c
if {[build_executable "failed to prepare" ${testfile} ${srcfile}] == -1} {
    return -1
}
Term::clean_restart 24 80 $testfile
if {![Term::enter_tui]} {
    unsupported "TUI not supported"
    return
}
Term::command "tui new-layout h { -horizontal src 1 asm 1 } 1 status 0 cmd 1"
Term::command "layout h"
with_test_prefix "original window sizes" {
    Term::check_box "source box" 0 0 40 15
    Term::check_box "asm box" 39 0 41 15
    Term::command "winwidth src +5"
}
with_test_prefix "after src +5" {
    Term::check_box "source box" 0 0 45 15
    Term::check_box "asm box" 44 0 36 15
    Term::command "winwidth asm -5"
}
with_test_prefix "after asm -5" {
    Term::dump_screen
    Term::check_box "source box" 0 0 50 15
    Term::check_box "asm box" 49 0 31 15
    Term::command "winwidth asm +8"
}
with_test_prefix "after asm +8" {
    Term::check_box "source box" 0 0 42 15
    Term::check_box "asm box" 41 0 39 15
    Term::command "winwidth src -2"
}
with_test_prefix "after src -2" {
    Term::check_box "source box" 0 0 40 15
    Term::check_box "asm box" 39 0 41 15
}
 |