summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_terminal3.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-20 03:56:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-20 03:56:56 +0000
commit75a9fa68f6cdd6769813a8c5e055bfb00a08c089 (patch)
treedaf1676b4e5ea491b7a370467a24b8181cc21827 /src/testdir/test_terminal3.vim
parentAdding upstream version 2:9.1.0377. (diff)
downloadvim-upstream/2%9.1.0496.tar.xz
vim-upstream/2%9.1.0496.zip
Adding upstream version 2:9.1.0496.upstream/2%9.1.0496
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/testdir/test_terminal3.vim')
-rw-r--r--src/testdir/test_terminal3.vim25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/testdir/test_terminal3.vim b/src/testdir/test_terminal3.vim
index 223bcc5..3cca1b0 100644
--- a/src/testdir/test_terminal3.vim
+++ b/src/testdir/test_terminal3.vim
@@ -10,6 +10,8 @@ source screendump.vim
source mouse.vim
source term_util.vim
+import './vim9.vim' as v9
+
let $PROMPT_COMMAND=''
func Test_terminal_altscreen()
@@ -935,7 +937,14 @@ func Test_terminal_vt420()
CheckRunVimInTerminal
" For Termcap
CheckUnix
- let rows=15
+ CheckExecutable infocmp
+ let a = system('infocmp vt420')
+ if v:shell_error
+ " reset v:shell_error
+ let a = system('true')
+ throw 'Skipped: vt420 terminfo not available'
+ endif
+ let rows = 15
call writefile([':set term=vt420'], 'Xterm420', 'D')
let buf = RunVimInTerminal('-S Xterm420', #{rows: rows})
@@ -952,4 +961,18 @@ func Test_terminal_vt420()
call StopVimInTerminal(buf)
endfunc
+" Test for using 'vertical' with term_start(). If a following term_start(),
+" doesn't have the 'vertical' attribute, then it should be split horizontally.
+func Test_terminal_vertical()
+ let lines =<< trim END
+ call term_start("NONE", {'vertical': 1})
+ call term_start("NONE")
+ VAR layout = winlayout()
+ call assert_equal('row', layout[0], string(layout))
+ call assert_equal('col', layout[1][0][0], string(layout))
+ :%bw!
+ END
+ call v9.CheckLegacyAndVim9Success(lines)
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab