diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-12 14:20:33 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-12 14:20:33 +0200 |
commit | 52992feafe8a996fbce29b97ae135abc169aa716 (patch) | |
tree | 5014ee45b2454708432e0735929b972d72cf84b2 | |
parent | 0b5dc644465c549ac54fe3c4ad232dd692000d26 (diff) | |
download | vim-git-52992feafe8a996fbce29b97ae135abc169aa716.tar.gz |
patch 8.1.1840: Testing: WorkingClipboard() is not accuratev8.1.1840
Problem: Testing: WorkingClipboard() is not accurate.
Solution: Check feature clipboard_working instead.
-rw-r--r-- | src/testdir/shared.vim | 10 | ||||
-rw-r--r-- | src/testdir/test_paste.vim | 5 | ||||
-rw-r--r-- | src/testdir/test_quotestar.vim | 6 | ||||
-rw-r--r-- | src/testdir/test_termcodes.vim | 4 | ||||
-rw-r--r-- | src/version.c | 2 |
5 files changed, 7 insertions, 20 deletions
diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim index 54a37f309..a4a7179de 100644 --- a/src/testdir/shared.vim +++ b/src/testdir/shared.vim @@ -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 diff --git a/src/testdir/test_paste.vim b/src/testdir/test_paste.vim index eab4cff53..c30140f43 100644 --- a/src/testdir/test_paste.vim +++ b/src/testdir/test_paste.vim @@ -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>" diff --git a/src/testdir/test_quotestar.vim b/src/testdir/test_quotestar.vim index d21ab35fc..432862e87 100644 --- a/src/testdir/test_quotestar.vim +++ b/src/testdir/test_quotestar.vim @@ -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')) diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim index 475a09a2f..75eaa7b8d 100644 --- a/src/testdir/test_termcodes.vim +++ b/src/testdir/test_termcodes.vim @@ -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 diff --git a/src/version.c b/src/version.c index aa44fb0dd..8e799264b 100644 --- a/src/version.c +++ b/src/version.c @@ -770,6 +770,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1840, +/**/ 1839, /**/ 1838, |