Mercurial > vim
comparison src/testdir/test_functions.vim @ 18821:a9cfb0db187d v8.1.2398
patch 8.1.2398: strptime() test fails on Japanese Mac
Commit: https://github.com/vim/vim/commit/9a838fe543b69582b0773f7c38a57f16fb32d765
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Dec 6 12:45:01 2019 +0100
patch 8.1.2398: strptime() test fails on Japanese Mac
Problem: strptime() test fails on Japanese Mac.
Solution: Use %T instead of %X.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 06 Dec 2019 13:00:04 +0100 |
parents | 9007e9896303 |
children | e7b4fff348dd |
comparison
equal
deleted
inserted
replaced
18820:2a9a47bf5540 | 18821:a9cfb0db187d |
---|---|
229 if exists('$TZ') | 229 if exists('$TZ') |
230 let tz = $TZ | 230 let tz = $TZ |
231 endif | 231 endif |
232 let $TZ = 'UTC' | 232 let $TZ = 'UTC' |
233 | 233 |
234 call assert_equal(1484653763, strptime('%Y-%m-%d %X', '2017-01-17 11:49:23')) | 234 call assert_equal(1484653763, strptime('%Y-%m-%d %T', '2017-01-17 11:49:23')) |
235 | 235 |
236 call assert_fails('call strptime()', 'E119:') | 236 call assert_fails('call strptime()', 'E119:') |
237 call assert_fails('call strptime("xxx")', 'E119:') | 237 call assert_fails('call strptime("xxx")', 'E119:') |
238 call assert_equal(0, strptime("%Y", '')) | 238 call assert_equal(0, strptime("%Y", '')) |
239 call assert_equal(0, strptime("%Y", "xxx")) | 239 call assert_equal(0, strptime("%Y", "xxx")) |