]> granicus.if.org Git - vim/commitdiff
patch 8.1.1297: invalid argument test fails without GTK v8.1.1297
authorBram Moolenaar <Bram@vim.org>
Wed, 8 May 2019 15:58:15 +0000 (17:58 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 8 May 2019 15:58:15 +0000 (17:58 +0200)
Problem:    Invalid argument test fails without GTK.
Solution:   Test -display and --display separately.

src/testdir/test_startup.vim
src/version.c

index a45130f7a7edf165a3a39ace6b9712ee0278f645..61c508275ca7f579398a32f07aa057b1aa507526 100644 (file)
@@ -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])
index 8e6b404f8bc321b9bfbb7cd4709841d5efad5cde..da0d1dfabb284718176ac8a8542945f790325bec 100644 (file)
@@ -767,6 +767,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1297,
 /**/
     1296,
 /**/