]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.1.1840: Testing: WorkingClipboard() is not accurate v8.1.1840
authorBram Moolenaar <Bram@vim.org>
Mon, 12 Aug 2019 12:20:33 +0000 (14:20 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 12 Aug 2019 12:20:33 +0000 (14:20 +0200)
Problem:    Testing: WorkingClipboard() is not accurate.
Solution:   Check feature clipboard_working instead.

src/testdir/shared.vim
src/testdir/test_paste.vim
src/testdir/test_quotestar.vim
src/testdir/test_termcodes.vim
src/version.c

index 54a37f309f2597da7a5ce571cdb960a1c9dfa3c9..a4a7179de40c6bb8bc9ae22bb9d02b4e38e85a94 100644 (file)
@@ -322,13 +322,3 @@ func RunVimPiped(before, after, arguments, pipecmd)
   endif
   return 1
 endfunc
-
-func WorkingClipboard()
-  if !has('clipboard')
-    return 0
-  endif
-  if has('x11')
-    return $DISPLAY != ""
-  endif
-  return 1
-endfunc
index eab4cff53770fce8af4914299558df340498f198..c30140f4397bd4a4a4c4a925f7bc80027687981c 100644 (file)
@@ -70,9 +70,8 @@ func Test_paste_insert_mode()
 endfunc
 
 func Test_paste_clipboard()
-  if !WorkingClipboard()
-    return
-  endif
+  CheckFeature clipboard_working
+
   let @+ = "nasty\<Esc>:!ls\<CR>command"
   new
   exe "normal i\<C-R>+\<Esc>"
index d21ab35fcc19e035bb4df6c4341435a5a63f54be..432862e875398b6d1f2a852304bf4be9ea816693 100644 (file)
@@ -1,11 +1,9 @@
 " *-register (quotestar) tests
 
 source shared.vim
-if !WorkingClipboard()
-  throw 'Skipped: no working clipboard'
-endif
+source check.vim
 
-source shared.vim
+CheckFeature clipboard_working
 
 func Do_test_quotestar_for_macunix()
   if empty(exepath('pbcopy')) || empty(exepath('pbpaste'))
index 475a09a2fd95dbd3f78956cc5b3856dc648528ba..75eaa7b8d731936e8a73e87e7e8c431f2c6961d3 100644 (file)
@@ -182,9 +182,7 @@ func Test_xterm_mouse_ctrl_click()
 endfunc
 
 func Test_term_mouse_middle_click()
-  if !WorkingClipboard()
-    throw 'Skipped: No working clipboard'
-  endif
+  CheckFeature clipboard_working
 
   new
   let save_mouse = &mouse
index aa44fb0dde6db0961589ee93343dd22ac724f9f4..8e799264b0d3eadc3231b0c8c690b54e95c62c02 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1840,
 /**/
     1839,
 /**/