vim-patch:8.1.1297: invalid argument test fails without GTK

Problem:    Invalid argument test fails without GTK.
Solution:   Test -display and --display separately.
240f7abab0
This commit is contained in:
Jan Edmund Lazo 2020-09-09 22:46:28 -04:00
parent 978dd99f45
commit 2ab6ec9e48
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15

View File

@ -383,7 +383,7 @@ func Test_invalid_args()
endfor endfor
endif endif
if has('clipboard') if has('gui_gtk')
let out = split(system(GetVimCommand() .. ' --display'), "\n") let out = split(system(GetVimCommand() .. ' --display'), "\n")
call assert_equal(1, v:shell_error) call assert_equal(1, v:shell_error)
call assert_match('^VIM - Vi IMproved .* (.*)$', out[0]) call assert_match('^VIM - Vi IMproved .* (.*)$', out[0])
@ -391,6 +391,14 @@ func Test_invalid_args()
call assert_equal('More info with: "vim -h"', out[2]) call assert_equal('More info with: "vim -h"', out[2])
endif 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") let out = split(system(GetVimCommand() .. ' -ix'), "\n")
call assert_equal(1, v:shell_error) call assert_equal(1, v:shell_error)
call assert_equal('nvim: Garbage after option argument: "-ix"', out[0]) call assert_equal('nvim: Garbage after option argument: "-ix"', out[0])