mirror of
https://github.com/vim/vim.git
synced 2025-10-20 08:14:18 -04:00
patch 9.1.1864: tests: Clipboard provider feature test failure
Problem: tests: Clipboard provider feature test failure Solution: Check in the test that the + clipboard register is available, fix compile warning (Foxe Chen) closes: #18586 Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
30ff1e3b02
commit
6582299b8d
@@ -7944,7 +7944,11 @@ f_has(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
x = TRUE;
|
||||
#ifdef FEAT_CLIPBOARD
|
||||
n = clip_plus.available && &clip_star != &clip_plus;
|
||||
# ifdef ONE_CLIPBOARD
|
||||
n = FALSE;
|
||||
# else
|
||||
n = clip_plus.available;
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@@ -37,6 +37,8 @@ endfunc
|
||||
" Test if "available" function works properly for provider
|
||||
func Test_clipboard_provider_available()
|
||||
CheckUnix
|
||||
CheckFeature clipboard_plus_avail
|
||||
|
||||
let v:clipproviders["test"] = {
|
||||
\ "available": function("AvailablePlus"),
|
||||
\ "paste": {
|
||||
|
@@ -746,17 +746,19 @@ func Test_clipboard_runtime_features()
|
||||
|
||||
set clipmethod=evaltest
|
||||
|
||||
if has('win32') || has('macunix')
|
||||
if has('win32') || has('macunix') ||
|
||||
\ (!has('wayland_clipboard') && !has('xterm_clipboard'))
|
||||
let g:vim_test_plus = '+'
|
||||
let g:vim_test_star = '*'
|
||||
clipreset
|
||||
|
||||
" plus register should be disabled on windows or macos
|
||||
" plus register should be disabled on windows or macos, or if Wayland and
|
||||
" X11 is not enabled.
|
||||
call assert_equal(0, has('clipboard_plus_avail'))
|
||||
call assert_equal(1, has('clipboard_star_avail'))
|
||||
else
|
||||
let g:vim_test_plus = '+'
|
||||
let g:vim_test_star = '*'
|
||||
let g:vim_test_plus = '+'
|
||||
clipreset
|
||||
|
||||
call assert_equal(1, has('clipboard_plus_avail'))
|
||||
|
@@ -734,6 +734,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1864,
|
||||
/**/
|
||||
1863,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user