patch 9.1.2137: test: Update tests for OpenBSD

Commit: 
https://github.com/vim/vim/commit/a24cb278bdf3ef618e46c1c88c9d02c838ab6065
Author: Kevin Goodsell <[email protected]>
Date:   Sat Feb 7 10:30:33 2026 +0000

    patch 9.1.2137: test: Update tests for OpenBSD
    
    Problem:  Some tests are not valid on OpenBSD.
    Solution: Add CheckNotOpenBSD, use it to skip certain tests
              (Kevin Goodsell).
    
    Test_readdirex_sort performs locale-dependent sorting. OpenBSD has
    minimal locale support.
    
    Test_stdin_no_newline hangs on OpenBSD and FreeBSD. I don't know exactly
    why, but it may be due to bash not exiting at the end of the test. This
    is skipped in the FreeBSD CI runs because bash is not installed.
    
    Test_detect_fifo uses /dev/fd/ files (via process substitution) as
    FIFOs. On OpenBSD the files in /dev/fd are not FIFOs.
    
    closes: #19351
    
    Signed-off-by: Kevin Goodsell <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt
index 3dd3754b1..3b9ecffd7 100644
--- a/runtime/doc/version9.txt
+++ b/runtime/doc/version9.txt
@@ -52507,4 +52507,9 @@ Problem:  :tab sbuffer may close old tabpage if 
BufLeave autocommand
           splits window (after 9.1.0143).
 Solution: Only close other windows if the buffer will be unloaded (zeertzjq).
 
+Patch 9.1.2137
+Problem:  Some tests are not valid on OpenBSD.
+Solution: Add CheckNotOpenBSD, use it to skip certain tests
+          (Kevin Goodsell).
+
  vim:tw=78:ts=8:noet:ft=help:norl:fdm=manual:nofoldenable
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index 0f3d30e51..0edfbd27f 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -3106,7 +3106,8 @@ func Test_readdirex_sort()
 
   " 6) Collation de_DE
   " Switch locale, this may not work on the CI system, if the locale isn't
-  " available
+  " available. Doesn't work on OpenBSD, which has minimal locale support.
+  CheckNotOpenBSD
   try
     lang collate de_DE
     let files = readdirex('Xsortdir2', 1, #{sort: 'collate'})->map({-> 
v:val.name})
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim
index 94b8613a9..0c2781e70 100644
--- a/src/testdir/test_startup.vim
+++ b/src/testdir/test_startup.vim
@@ -832,6 +832,9 @@ func Test_stdin_no_newline()
   CheckScreendump
   CheckUnix
   CheckExecutable bash
+  " For some reason bash doesn't exit at the end of the test on FreeBSD &
+  " OpenBSD.
+  CheckNotBSD
 
   let $PS1 = 'TEST_PROMPT> '
   let buf = RunVimInTerminal('', #{rows: 20, cmd: 'bash --noprofile --norc'})
diff --git a/src/testdir/test_startup_utf8.vim 
b/src/testdir/test_startup_utf8.vim
index f4de09034..55888e8df 100644
--- a/src/testdir/test_startup_utf8.vim
+++ b/src/testdir/test_startup_utf8.vim
@@ -60,6 +60,8 @@ endfunc
 
 func Test_detect_fifo()
   CheckUnix
+  " On OpenBSD /dev/fd/n files are character special, not FIFO
+  CheckNotOpenBSD
   " Using bash/zsh's process substitution.
   if executable('bash')
     set shell=bash
diff --git a/src/testdir/util/check.vim b/src/testdir/util/check.vim
index 8a3a97e4f..717101607 100644
--- a/src/testdir/util/check.vim
+++ b/src/testdir/util/check.vim
@@ -115,6 +115,17 @@ func CheckNotBSD()
   endif
 endfunc
 
+" Command to check for not running on OpenBSD
+command CheckNotOpenBSD call CheckNotOpenBSD()
+func CheckNotOpenBSD()
+  if has('bsd')
+    let uname = trim(system('uname'))
+    if uname == 'OpenBSD'
+      throw 'Skipped: does not work on OpenBSD'
+    endif
+  endif
+endfunc
+
 " Command to check for not running on a MacOS
 command CheckNotMac call CheckNotMac()
 func CheckNotMac()
diff --git a/src/version.c b/src/version.c
index 8721de449..d083cd8ff 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 */
+/**/
+    2137,
 /**/
     2136,
 /**/

-- 
-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1vofoG-00HX6Z-Ev%40256bit.org.

Raspunde prin e-mail lui