changeset 16588:c56fe1427025 v8.1.1297

patch 8.1.1297: invalid argument test fails without GTK commit https://github.com/vim/vim/commit/240f7abab01b5e3fd5336dd780e42501ec3f2fcb Author: Bram Moolenaar <Bram@vim.org> Date: Wed May 8 17:58:15 2019 +0200 patch 8.1.1297: invalid argument test fails without GTK Problem: Invalid argument test fails without GTK. Solution: Test -display and --display separately.
author Bram Moolenaar <Bram@vim.org>
date Wed, 08 May 2019 18:00:07 +0200
parents c377bf91cc8a
children 21a60d40c5ad
files src/testdir/test_startup.vim src/version.c
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_startup.vim
+++ b/src/testdir/test_startup.vim
@@ -422,7 +422,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])
@@ -430,6 +430,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_match('^VIM - Vi IMproved .* (.*)$',          out[0])
--- a/src/version.c
+++ b/src/version.c
@@ -768,6 +768,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1297,
+/**/
     1296,
 /**/
     1295,