Commit: patch 9.1.1864: tests: Clipboard provider feature test failure

2 views
Skip to first unread message

Christian Brabandt

unread,
Oct 17, 2025, 1:45:20 PMOct 17
to vim...@googlegroups.com
patch 9.1.1864: tests: Clipboard provider feature test failure

Commit: https://github.com/vim/vim/commit/6582299b8db415016aba782c76bfbf2205ab59d9
Author: Foxe Chen <chen...@gmail.com>
Date: Fri Oct 17 17:30:43 2025 +0000

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...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/evalfunc.c b/src/evalfunc.c
index 17e7adbcb..1438f2211 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -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
}
}
diff --git a/src/testdir/test_clipboard_provider.vim b/src/testdir/test_clipboard_provider.vim
index 8cc55c3e3..ec9bc5234 100644
--- a/src/testdir/test_clipboard_provider.vim
+++ b/src/testdir/test_clipboard_provider.vim
@@ -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": {
diff --git a/src/testdir/test_eval_stuff.vim b/src/testdir/test_eval_stuff.vim
index 0e5c7e923..6adfb4d76 100644
--- a/src/testdir/test_eval_stuff.vim
+++ b/src/testdir/test_eval_stuff.vim
@@ -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'))
diff --git a/src/version.c b/src/version.c
index 9e05de8a3..268d1fc61 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1864,
/**/
1863,
/**/
Reply all
Reply to author
Forward
0 new messages