aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_startup.vim
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-03-27 10:10:11 -0400
committerGitHub <noreply@github.com>2021-03-27 10:10:11 -0400
commit75a9db5b7d60c016a950dac7f0a0932e7d7c6df8 (patch)
treeec4c92e7763b803f376a16d23a3420d1497f53a2 /src/nvim/testdir/test_startup.vim
parentf0ace6d419380907b719edd2ea1d2256e92beb84 (diff)
parent9118bf191e1657732bdd5cb5fb1f98dc17cf7f41 (diff)
downloadrneovim-75a9db5b7d60c016a950dac7f0a0932e7d7c6df8.tar.gz
rneovim-75a9db5b7d60c016a950dac7f0a0932e7d7c6df8.tar.bz2
rneovim-75a9db5b7d60c016a950dac7f0a0932e7d7c6df8.zip
Merge pull request #14223 from janlazo/vim-8.2.2659
vim-patch:8.2.{1666,2045,2659,2662}
Diffstat (limited to 'src/nvim/testdir/test_startup.vim')
-rw-r--r--src/nvim/testdir/test_startup.vim28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_startup.vim b/src/nvim/testdir/test_startup.vim
index 4d1ad10c23..eb9378194f 100644
--- a/src/nvim/testdir/test_startup.vim
+++ b/src/nvim/testdir/test_startup.vim
@@ -862,6 +862,34 @@ func Test_x_arg()
call delete('Xtest_x_arg')
endfunc
+" Test for --not-a-term avoiding escape codes.
+func Test_not_a_term()
+ CheckUnix
+ CheckNotGui
+
+ if &shellredir =~ '%s'
+ let redir = printf(&shellredir, 'Xvimout')
+ else
+ let redir = &shellredir .. ' Xvimout'
+ endif
+
+ " Without --not-a-term there are a few escape sequences.
+ " This will take 2 seconds because of the missing --not-a-term
+ let cmd = GetVimProg() .. ' --cmd quit ' .. redir
+ exe "silent !" . cmd
+ " call assert_match("\<Esc>", readfile('Xvimout')->join())
+ call assert_match("\<Esc>", join(readfile('Xvimout')))
+ call delete('Xvimout')
+
+ " With --not-a-term there are no escape sequences.
+ let cmd = GetVimProg() .. ' --not-a-term --cmd quit ' .. redir
+ exe "silent !" . cmd
+ " call assert_notmatch("\<Esc>", readfile('Xvimout')->join())
+ call assert_notmatch("\<Esc>", join(readfile('Xvimout')))
+ call delete('Xvimout')
+endfunc
+
+
" Test starting vim with various names: vim, ex, view, evim, etc.
func Test_progname()
CheckUnix