aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_findfile.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-11-03 16:54:25 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-11-03 17:04:34 +0800
commitfe565ca382bb6cc4cd9f1c01de42d62c48922bf6 (patch)
treefc6c3550d92cbce3da5e2b5552fb46c93663e2a7 /test/old/testdir/test_findfile.vim
parent981fa11c91d3655828b4f70ccf7d079d917d5b6b (diff)
downloadrneovim-fe565ca382bb6cc4cd9f1c01de42d62c48922bf6.tar.gz
rneovim-fe565ca382bb6cc4cd9f1c01de42d62c48922bf6.tar.bz2
rneovim-fe565ca382bb6cc4cd9f1c01de42d62c48922bf6.zip
vim-patch:9.1.0835: :setglobal doesn't work properly for 'ffu' and 'tsrfu'
Problem: :setglobal doesn't work properly for 'ffu' and 'tsrfu' when the local value is set (after v9.1.0831) Solution: Check os_flags instead of buffer option variable (zeertzjq). closes: vim/vim#15980 https://github.com/vim/vim/commit/6eda269600b5ca952f28e808c662f67e581933d7
Diffstat (limited to 'test/old/testdir/test_findfile.vim')
-rw-r--r--test/old/testdir/test_findfile.vim37
1 files changed, 36 insertions, 1 deletions
diff --git a/test/old/testdir/test_findfile.vim b/test/old/testdir/test_findfile.vim
index 2c049537f0..539c7a661a 100644
--- a/test/old/testdir/test_findfile.vim
+++ b/test/old/testdir/test_findfile.vim
@@ -364,7 +364,7 @@ func Test_findfunc()
" Error cases
- " Function that doesn't any argument
+ " Function that doesn't take any arguments
func FindFuncNoArg()
endfunc
set findfunc=FindFuncNoArg
@@ -484,6 +484,41 @@ func Test_findfunc_scriptlocal_func()
call assert_equal('abc', g:FindFuncArg)
bw!
+ new | only
+ set findfunc=
+ setlocal findfunc=NoSuchFunc
+ setglobal findfunc=s:FindFuncScript
+ call assert_equal('NoSuchFunc', &findfunc)
+ call assert_equal('NoSuchFunc', &l:findfunc)
+ call assert_equal(expand('<SID>') .. 'FindFuncScript', &g:findfunc)
+ new | only
+ call assert_equal(expand('<SID>') .. 'FindFuncScript', &findfunc)
+ call assert_equal(expand('<SID>') .. 'FindFuncScript', &g:findfunc)
+ call assert_equal('', &l:findfunc)
+ let g:FindFuncArg = ''
+ find abc
+ call assert_equal('abc', g:FindFuncArg)
+ bw!
+
+ new | only
+ set findfunc=
+ setlocal findfunc=NoSuchFunc
+ set findfunc=s:FindFuncScript
+ call assert_equal(expand('<SID>') .. 'FindFuncScript', &findfunc)
+ call assert_equal(expand('<SID>') .. 'FindFuncScript', &g:findfunc)
+ call assert_equal('', &l:findfunc)
+ let g:FindFuncArg = ''
+ find abc
+ call assert_equal('abc', g:FindFuncArg)
+ new | only
+ call assert_equal(expand('<SID>') .. 'FindFuncScript', &findfunc)
+ call assert_equal(expand('<SID>') .. 'FindFuncScript', &g:findfunc)
+ call assert_equal('', &l:findfunc)
+ let g:FindFuncArg = ''
+ find abc
+ call assert_equal('abc', g:FindFuncArg)
+ bw!
+
set findfunc=
delfunc s:FindFuncScript
endfunc