From: Kevin Goodsell Date: Sat, 7 Feb 2026 10:30:33 +0000 (+0000) Subject: patch 9.1.2137: test: Update tests for OpenBSD X-Git-Tag: v9.1.2137^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a24cb278bdf3ef618e46c1c88c9d02c838ab6065;p=thirdparty%2Fvim.git 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 Signed-off-by: Christian Brabandt --- diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt index 3dd3754b18..3b9ecffd77 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 0f3d30e51b..0edfbd27fb 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 94b8613a9e..0c2781e702 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 f4de090347..55888e8dfd 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 8a3a97e4f2..7171016077 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 8721de4496..d083cd8ffd 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, /**/