Skip to content

Commit 983d808

Browse files
committed
patch 9.0.1893: CI: strptime test fails on BSD14
Problem: CI: strptime test fails on BSD14 Solution: Skip the test Signed-off-by: Christian Brabandt <[email protected]>
1 parent 24a95f4 commit 983d808

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/testdir/test_functions.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ endfunc
300300

301301
func Test_strptime()
302302
CheckFunction strptime
303+
CheckNotBSD
303304

304305
if exists('$TZ')
305306
let tz = $TZ
@@ -314,6 +315,8 @@ func Test_strptime()
314315

315316
call assert_fails('call strptime()', 'E119:')
316317
call assert_fails('call strptime("xxx")', 'E119:')
318+
" This fails on BSD 14 and returns
319+
" -2209078800 instead of 0
317320
call assert_equal(0, strptime("%Y", ''))
318321
call assert_equal(0, strptime("%Y", "xxx"))
319322

src/testdir/test_vim9_builtin.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4343,10 +4343,13 @@ enddef
43434343

43444344
def Test_strptime()
43454345
CheckFunction strptime
4346+
CheckNotBSD
43464347
if exists_compiled('*strptime')
43474348
v9.CheckDefAndScriptFailure(['strptime(10, "2021")'], ['E1013: Argument 1: type mismatch, expected string but got number', 'E1174: String required for argument 1'])
43484349
v9.CheckDefAndScriptFailure(['strptime("%Y", 2021)'], ['E1013: Argument 2: type mismatch, expected string but got number', 'E1174: String required for argument 2'])
43494350
assert_notequal(0, strptime('%Y', '2021'))
4351+
# This fails on BSD 14 and returns
4352+
# -2209078800 instead of 0
43504353
assert_equal(0, strptime('%Y', ''))
43514354
endif
43524355
enddef

src/version.c

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

700700
static int included_patches[] =
701701
{ /* Add new patch number below this line */
702+
/**/
703+
1893,
702704
/**/
703705
1892,
704706
/**/

0 commit comments

Comments
 (0)