summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2024-10-12 11:36:58 +0200
committerChristian Brabandt <cb@256bit.org>2024-10-12 11:36:58 +0200
commitea997edc7aaa5bc1d645b57b6700e0b30c07acbd (patch)
tree12bde12ea4c4de60453da46aee114596cf96d172
parent59086a25c4a724c13447aa421c993e5441a628f6 (diff)
patch 9.1.0776: test_strftime may fail because of missing TZ datav9.1.0776
Problem: test_strftime may fail because of missing TZ data Solution: Use GMT offsets to validate timezone differences (James McCoy) Some systems only provide timezones that follow the geographical region naming (e.g. America/New_York) by default and require an additional install for other names (like EST). The GMT+<offset> format must always be honored, so use that to generate distinct data for the test. closes: #15848 Signed-off-by: James McCoy <jamessan@jamessan.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
-rw-r--r--src/testdir/test_functions.vim12
-rw-r--r--src/version.c2
2 files changed, 8 insertions, 6 deletions
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index 1021d05090..66b8876084 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -277,17 +277,17 @@ func Test_strftime()
let tz = $TZ
endif
- " Force EST and then UTC, save the current hour (24-hour clock) for each
- let $TZ = 'EST' | let est = strftime('%H')
- let $TZ = 'UTC' | let utc = strftime('%H')
+ " Force different time zones, save the current hour (24-hour clock) for each
+ let $TZ = 'GMT+1' | let one = strftime('%H')
+ let $TZ = 'GMT+2' | let two = strftime('%H')
" Those hours should be two bytes long, and should not be the same; if they
" are, a tzset(3) call may have failed somewhere
- call assert_equal(strlen(est), 2)
- call assert_equal(strlen(utc), 2)
+ call assert_equal(strlen(one), 2)
+ call assert_equal(strlen(two), 2)
" TODO: this fails on MS-Windows
if has('unix')
- call assert_notequal(est, utc)
+ call assert_notequal(one, two)
endif
" If we cached a timezone value, put it back, otherwise clear it
diff --git a/src/version.c b/src/version.c
index 01acbe71da..5dbd50044f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 776,
+/**/
775,
/**/
774,