From cbc0f3141525f5df1d559940b47d2c1298e8bd71 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Thu, 5 Mar 2026 16:32:46 +0100 Subject: [PATCH] tests: Skip wayland tests when X11 is not available or $XDG_RUNTIME_DIR is not defined Signed-off-by: Christian Brabandt --- src/testdir/test_wayland.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/testdir/test_wayland.vim b/src/testdir/test_wayland.vim index 5b801c9a44146..c690d0cfe9b7e 100644 --- a/src/testdir/test_wayland.vim +++ b/src/testdir/test_wayland.vim @@ -6,6 +6,7 @@ CheckUnix CheckFeature job CheckWaylandCompositor CheckNotGui +CheckEnv XDG_RUNTIME_DIR if !executable('wl-paste') || !executable('wl-copy') throw "Skipped: wl-clipboard is not available" @@ -58,6 +59,10 @@ endfunc func s:CheckClientserver() CheckFeature clientserver + if has('x11') + CheckEnv DISPLAY + endif + if has('socketserver') && !has('x11') if v:servername == "" call remote_startserver('VIMSOCKETSERVER')