summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_functions.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_functions.vim')
-rw-r--r--src/testdir/test_functions.vim32
1 files changed, 27 insertions, 5 deletions
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index acdb954..1021d05 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -923,6 +923,10 @@ func Test_mode()
call feedkeys("gQ\<Insert>\<F2>vi\<CR>", 'xt')
call assert_equal("c-cvr", g:current_modes)
+ " Commandline mode in Visual mode should return "c-c", never "v-v".
+ call feedkeys("v\<Cmd>call input('')\<CR>\<F2>\<CR>\<Esc>", 'xt')
+ call assert_equal("c-c", g:current_modes)
+
" Executing commands in Vim Ex mode should return "cv", never "cvr",
" as Cmdline editing has already ended.
call feedkeys("gQcall Save_mode()\<CR>vi\<CR>", 'xt')
@@ -3822,6 +3826,29 @@ func Test_glob2()
endif
endfunc
+func Test_glob_symlinks()
+ call writefile([], 'Xglob1')
+
+ if has("win32")
+ silent !mklink XglobBad DoesNotExist
+ if v:shell_error
+ throw 'Skipped: cannot create symlinks'
+ endif
+ silent !mklink XglobOk Xglob1
+ else
+ silent !ln -s DoesNotExist XglobBad
+ silent !ln -s Xglob1 XglobOk
+ endif
+
+ " The broken symlink is excluded when alllinks is false.
+ call assert_equal(['Xglob1', 'XglobBad', 'XglobOk'], sort(glob('Xglob*', 0, 1, 1)))
+ call assert_equal(['Xglob1', 'XglobOk'], sort(glob('Xglob*', 0, 1, 0)))
+
+ call delete('Xglob1')
+ call delete('XglobBad')
+ call delete('XglobOk')
+endfunc
+
" Test for browse()
func Test_browse()
CheckFeature browse
@@ -3842,11 +3869,6 @@ func Test_default_arg_value()
call assert_equal('msg', HasDefault())
endfunc
-" Test for gettext()
-func Test_gettext()
- call assert_fails('call gettext(1)', 'E1174:')
-endfunc
-
func Test_builtin_check()
call assert_fails('let g:["trim"] = {x -> " " .. x}', 'E704:')
call assert_fails('let g:.trim = {x -> " " .. x}', 'E704:')