Skip to content

Commit 3715836

Browse files
KevinGoodsellchrisbra
authored andcommitted
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]>
1 parent ce1e562 commit 3715836

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/testdir/test_excmd.vim

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,15 @@ endfunc
236236
func Test_language_cmd()
237237
CheckFeature multi_lang
238238

239-
call assert_fails('language ctype non_existing_lang', 'E197:')
240-
call assert_fails('language time non_existing_lang', 'E197:')
239+
" OpenBSD allows nearly arbitrary locale names, since it largely ignores them
240+
" (see setlocale(3)). One useful exception for this test is that in doesn't
241+
" allow names containing dots unless they end in '.UTF-8'.
242+
"
243+
" Windows also allows nonsensical locale names, though it seems to reject
244+
" names with multiple underscores (possibly expecting 'language_region', but
245+
" not 'language_region_additional').
246+
call assert_fails('language ctype non_existing_lang.bad', 'E197:')
247+
call assert_fails('language time non_existing_lang.bad', 'E197:')
241248
endfunc
242249

243250
" Test for the :confirm command dialog

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,8 @@ static char *(features[]) =
734734

735735
static int included_patches[] =
736736
{ /* Add new patch number below this line */
737+
/**/
738+
2119,
737739
/**/
738740
2118,
739741
/**/

0 commit comments

Comments
 (0)