patch 9.1.2119: tests: Test_language_cmd fails on OpenBSD

Commit: 
https://github.com/vim/vim/commit/371583642a5eecc134d285e6df49f5edceeab95c
Author: Kevin Goodsell <[email protected]>
Date:   Fri Jan 30 10:00:27 2026 +0000

    patch 9.1.2119: tests: Test_language_cmd fails on OpenBSD
    
    Problem:  tests: Test_language_cmd fails on OpenBSD because the test
              uses an invalid locale name and expects the command to produce
              an error. OpenBSD accepts (almost) any locale name as valid by
              design, so the :lang command succeeds and the test fails.
    Solution: Slightly update the "bad" locale name to make it something
              that OpenBSD considers invalid by adding a dot (but not ending
              with ".UTF-8"). Maintain the original two underscores in the
              name because that ensures Windows will also see it as invalid
              (Kevin Goodsell).
    
    closes: #19280
    
    Signed-off-by: Kevin Goodsell <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/testdir/test_excmd.vim b/src/testdir/test_excmd.vim
index 8c3282855..c671adfe9 100644
--- a/src/testdir/test_excmd.vim
+++ b/src/testdir/test_excmd.vim
@@ -236,8 +236,15 @@ endfunc
 func Test_language_cmd()
   CheckFeature multi_lang
 
-  call assert_fails('language ctype non_existing_lang', 'E197:')
-  call assert_fails('language time non_existing_lang', 'E197:')
+  " OpenBSD allows nearly arbitrary locale names, since it largely ignores them
+  " (see setlocale(3)). One useful exception for this test is that in doesn't
+  " allow names containing dots unless they end in '.UTF-8'.
+  "
+  " Windows also allows nonsensical locale names, though it seems to reject
+  " names with multiple underscores (possibly expecting 'language_region', but
+  " not 'language_region_additional').
+  call assert_fails('language ctype non_existing_lang.bad', 'E197:')
+  call assert_fails('language time non_existing_lang.bad', 'E197:')
 endfunc
 
 " Test for the :confirm command dialog
diff --git a/src/version.c b/src/version.c
index c43326bbd..b52290a85 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 */
+/**/
+    2119,
 /**/
     2118,
 /**/

-- 
-- 
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/E1vllWp-003i62-4L%40256bit.org.

Raspunde prin e-mail lui