patch 9.1.1523: tests: test_clipmethod fails in non X11 environment

Commit: 
https://github.com/vim/vim/commit/a4874d4d368b23088f414127550dea866955041b
Author: Christian Brabandt <c...@256bit.org>
Date:   Mon Jul 7 20:07:06 2025 +0200

    patch 9.1.1523: tests: test_clipmethod fails in non X11 environment
    
    Problem:  tests: test_clipmethod fails in non X11 environment
    Solution: test that $DISPLAY is available
    
    related: #17677
    
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/testdir/test_clipmethod.vim b/src/testdir/test_clipmethod.vim
index 7573ce228..591b3a2fc 100644
--- a/src/testdir/test_clipmethod.vim
+++ b/src/testdir/test_clipmethod.vim
@@ -34,7 +34,9 @@ func Test_clipmethod_order()
   :wlrestore 1239
   clipreset
 
-  call assert_equal("x11", v:clipmethod)
+  if exists("$DISPLAY")
+    call assert_equal("x11", v:clipmethod)
+  endif
 
   :xrestore 1239
   clipreset
@@ -49,9 +51,11 @@ func Test_clipmethod_order()
   call assert_equal("wayland", v:clipmethod)
   call assert_equal(1, has('clipboard_working'))
 
-  set cpm=x11
+  if exists("$DISPLAY")
+    set cpm=x11
 
-  call assert_equal("x11", v:clipmethod)
+    call assert_equal("x11", v:clipmethod)
+  endif
 
   set cpm=wayland
 
@@ -101,7 +105,9 @@ func Test_clipreset_switches()
   wlrestore!
 
   call assert_equal("", v:wayland_display)
-  call assert_equal("x11", v:clipmethod)
+  if exists("$DISPLAY")
+    call assert_equal("x11", v:clipmethod)
+  endif
 
   " Do the same but kill a X11 server
 
@@ -150,20 +156,23 @@ func Test_clipreset_switches()
   let l:job = job_start(l:cmd, { 'stoponexit': 'kill', 'out_io': 'null'})
 
   call WaitForAssert({-> assert_equal("run", job_status(l:job))})
-  call WaitForAssert({-> assert_match(l:name, serverlist())})
+  if exists("$DISPLAY")
+    call WaitForAssert({-> assert_match(l:name, serverlist())})
+  endif
 
   " Change x server to the one that will be killed, then block until
   " v:clipmethod is none.
-  call remote_send(l:name, ":xrestore " .. l:xdisplay ..
+  if exists("$DISPLAY")
+    call remote_send(l:name, ":xrestore " .. l:xdisplay ..
         \ ' | call DoIt()' .. "\<CR>")
 
-  call EndXServer(l:xdisplay)
-
-  call WaitFor({-> filereadable('Xtest')})
+    call EndXServer(l:xdisplay)
+    call WaitFor({-> filereadable('Xtest')})
 
-  " For some reason readfile sometimes returns an empty list despite the file
-  " existing, this why WaitForAssert() is used.
-  call WaitForAssert({-> assert_equal(['SUCCESS'], readfile('Xtest'))}, 1000)
+    " For some reason readfile sometimes returns an empty list despite the file
+    " existing, this why WaitForAssert() is used.
+    call WaitForAssert({-> assert_equal(['SUCCESS'], readfile('Xtest'))}, 1000)
+  endif
 endfunc
 
 " vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/version.c b/src/version.c
index ba1034138..0ae79834a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1523,
 /**/
     1522,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1uYqMq-0098Nv-6C%40256bit.org.

Raspunde prin e-mail lui