From 2ab6ec9e480741d37e31febf86f6272612f079f3 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 9 Sep 2020 22:46:28 -0400 Subject: vim-patch:8.1.1297: invalid argument test fails without GTK Problem: Invalid argument test fails without GTK. Solution: Test -display and --display separately. https://github.com/vim/vim/commit/240f7abab01b5e3fd5336dd780e42501ec3f2fcb --- src/nvim/testdir/test_startup.vim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/testdir/test_startup.vim b/src/nvim/testdir/test_startup.vim index b460798c5f..0b0cfb7a5c 100644 --- a/src/nvim/testdir/test_startup.vim +++ b/src/nvim/testdir/test_startup.vim @@ -383,7 +383,7 @@ func Test_invalid_args() endfor endif - if has('clipboard') + if has('gui_gtk') let out = split(system(GetVimCommand() .. ' --display'), "\n") call assert_equal(1, v:shell_error) 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]) 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) call assert_equal('nvim: Garbage after option argument: "-ix"', out[0]) -- cgit