aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_functions.vim
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-11-25 19:15:05 +0000
committerJosh Rahm <joshuarahm@gmail.com>2024-11-25 19:27:38 +0000
commitc5d770d311841ea5230426cc4c868e8db27300a8 (patch)
treedd21f70127b4b8b5f109baefc8ecc5016f507c91 /test/old/testdir/test_functions.vim
parent9be89f131f87608f224f0ee06d199fcd09d32176 (diff)
parent081beb3659bd6d8efc3e977a160b1e72becbd8a2 (diff)
downloadrneovim-c5d770d311841ea5230426cc4c868e8db27300a8.tar.gz
rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.tar.bz2
rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.zip
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'test/old/testdir/test_functions.vim')
-rw-r--r--test/old/testdir/test_functions.vim22
1 files changed, 15 insertions, 7 deletions
diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim
index ffe7f3fb39..327ea98e1c 100644
--- a/test/old/testdir/test_functions.vim
+++ b/test/old/testdir/test_functions.vim
@@ -272,17 +272,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
@@ -383,6 +383,12 @@ func Test_simplify()
call assert_equal('/', simplify('/.'))
call assert_equal('/', simplify('/..'))
call assert_equal('/...', simplify('/...'))
+ call assert_equal('//path', simplify('//path'))
+ if has('unix')
+ call assert_equal('/path', simplify('///path'))
+ call assert_equal('/path', simplify('////path'))
+ endif
+
call assert_equal('./dir/file', './dir/file'->simplify())
call assert_equal('./dir/file', simplify('.///dir//file'))
call assert_equal('./dir/file', simplify('./dir/./file'))
@@ -2069,6 +2075,7 @@ endfunc
" Test for the inputdialog() function
func Test_inputdialog()
+ set timeout timeoutlen=10
if has('gui_running')
call assert_fails('let v=inputdialog([], "xx")', 'E730:')
call assert_fails('let v=inputdialog("Q", [])', 'E730:')
@@ -2078,6 +2085,7 @@ func Test_inputdialog()
call feedkeys(":let v=inputdialog('Q:', 'xx', 'yy')\<CR>\<Esc>", 'xt')
call assert_equal('yy', v)
endif
+ set timeout& timeoutlen&
endfunc
" Test for inputlist()
@@ -3089,7 +3097,7 @@ func Test_range()
call assert_fails('call term_start(range(3, 4))', 'E474:')
let g:terminal_ansi_colors = range(16)
if has('win32')
- let cmd = "cmd /c dir"
+ let cmd = "cmd /D /c dir"
else
let cmd = "ls"
endif