]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.2137: test: Update tests for OpenBSD v9.1.2137
authorKevin Goodsell <kevin-opensource@omegacrash.net>
Sat, 7 Feb 2026 10:30:33 +0000 (10:30 +0000)
committerChristian Brabandt <cb@256bit.org>
Sat, 7 Feb 2026 10:30:33 +0000 (10:30 +0000)
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 <kevin-opensource@omegacrash.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/version9.txt
src/testdir/test_functions.vim
src/testdir/test_startup.vim
src/testdir/test_startup_utf8.vim
src/testdir/util/check.vim
src/version.c

index 3dd3754b1820ed134d38c05e501a63de050e535d..3b9ecffd7722c91f06c5d7416b74d082ccd496d2 100644 (file)
@@ -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
index 0f3d30e51b7aa74cb5c0b79259304d0b9d24bbb1..0edfbd27fb7dc21897c445ab6a7d9ab137ca7549 100644 (file)
@@ -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})
index 94b8613a9e0caf5c91818027208e1c6e59e13144..0c2781e702420b09dfaa962a884f98eb20d0e62c 100644 (file)
@@ -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'})
index f4de090347fe3d29b869d9bb3d1379a75bdbe7c8..55888e8dfd0287b033033f42772779e2d8362d1c 100644 (file)
@@ -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
index 8a3a97e4f2198f852b95ec2234627a312156b8ef..717101607712cf0d390fc3d4630dd8aa67eba60d 100644 (file)
@@ -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()
index 8721de4496852a60258680ccd5c30e5e92fed32c..d083cd8ffdc1b08e9826deb3bd06dfb86ef5b28c 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2137,
 /**/
     2136,
 /**/