aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-09-09 22:34:27 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-09-11 18:23:46 -0400
commit978dd99f453c8430da4416f1fd5ca7af91b56240 (patch)
treec3360c31b328543f77b63ce5912543f02cab9ac4 /src
parent997147e4bbb6c427e0b811d9d02991976afa9785 (diff)
downloadrneovim-978dd99f453c8430da4416f1fd5ca7af91b56240.tar.gz
rneovim-978dd99f453c8430da4416f1fd5ca7af91b56240.tar.bz2
rneovim-978dd99f453c8430da4416f1fd5ca7af91b56240.zip
vim-patch:8.1.1296: crash when using invalid command line argument
Problem: Crash when using invalid command line argument. Solution: Check for options not being initialized. https://github.com/vim/vim/commit/27821260c0afaac85cb1c10627f1d7fbe48860ae
Diffstat (limited to 'src')
-rw-r--r--src/nvim/testdir/test_startup.vim18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/nvim/testdir/test_startup.vim b/src/nvim/testdir/test_startup.vim
index 9abaca5957..b460798c5f 100644
--- a/src/nvim/testdir/test_startup.vim
+++ b/src/nvim/testdir/test_startup.vim
@@ -369,12 +369,11 @@ func Test_invalid_args()
endfor
if has('clientserver')
- " FIXME: need to add --servername to this list
- " but it causes vim-8.1.1282 to crash!
for opt in ['--remote', '--remote-send', '--remote-silent', '--remote-expr',
\ '--remote-tab', '--remote-tab-wait',
\ '--remote-tab-wait-silent', '--remote-tab-silent',
\ '--remote-wait', '--remote-wait-silent',
+ \ '--servername',
\ ]
let out = split(system(GetVimCommand() .. ' ' .. opt), "\n")
call assert_equal(1, v:shell_error)
@@ -384,14 +383,13 @@ func Test_invalid_args()
endfor
endif
- " FIXME: commented out as this causes vim-8.1.1282 to crash!
- "if has('clipboard')
- " let out = split(system(GetVimCommand() .. ' --display'), "\n")
- " call assert_equal(1, v:shell_error)
- " call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
- " call assert_equal('Argument missing after: "--display"', out[1])
- " call assert_equal('More info with: "vim -h"', out[2])
- "endif
+ if has('clipboard')
+ let out = split(system(GetVimCommand() .. ' --display'), "\n")
+ call assert_equal(1, v:shell_error)
+ call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
+ call assert_equal('Argument missing after: "--display"', out[1])
+ call assert_equal('More info with: "vim -h"', out[2])
+ endif
let out = split(system(GetVimCommand() .. ' -ix'), "\n")
call assert_equal(1, v:shell_error)