diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2023-02-02 19:02:58 +0000 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2023-02-02 19:02:58 +0000 |
| commit | b255fa570d8b041e4c81e3454d51e06100c2fa4f (patch) | |
| tree | d3b246b467500ca48067ed4a45d2fa53966cd9f1 /src/nvim/testdir/test_gf.vim | |
| parent | eeccad2ff1ae8892fe9e06d733a7b07a166eecb0 (diff) | |
| parent | 0bd07bea095a8000cffa4f379c1fa53e009c1143 (diff) | |
| download | rneovim-20230125_mix.tar.gz rneovim-20230125_mix.tar.bz2 rneovim-20230125_mix.zip | |
Merge branch 'aucmd_textputpost' into 20230125_mix20230125_mix
Diffstat (limited to 'src/nvim/testdir/test_gf.vim')
| -rw-r--r-- | src/nvim/testdir/test_gf.vim | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_gf.vim b/src/nvim/testdir/test_gf.vim index e369645328..f09dbd72ce 100644 --- a/src/nvim/testdir/test_gf.vim +++ b/src/nvim/testdir/test_gf.vim @@ -234,6 +234,7 @@ func Test_includeexpr_scriptlocal_func() endfunc set includeexpr=s:IncludeFunc() call assert_equal(expand('<SID>') .. 'IncludeFunc()', &includeexpr) + call assert_equal(expand('<SID>') .. 'IncludeFunc()', &g:includeexpr) new | only call setline(1, 'TestFile1') let g:IncludeFname = '' @@ -242,11 +243,35 @@ func Test_includeexpr_scriptlocal_func() bw! set includeexpr=<SID>IncludeFunc() call assert_equal(expand('<SID>') .. 'IncludeFunc()', &includeexpr) + call assert_equal(expand('<SID>') .. 'IncludeFunc()', &g:includeexpr) new | only call setline(1, 'TestFile2') let g:IncludeFname = '' call assert_fails('normal! gf', 'E447:') call assert_equal('TestFile2', g:IncludeFname) + bw! + setlocal includeexpr= + setglobal includeexpr=s:IncludeFunc() + call assert_equal(expand('<SID>') .. 'IncludeFunc()', &g:includeexpr) + call assert_equal('', &includeexpr) + new + call assert_equal(expand('<SID>') .. 'IncludeFunc()', &includeexpr) + call setline(1, 'TestFile3') + let g:IncludeFname = '' + call assert_fails('normal! gf', 'E447:') + call assert_equal('TestFile3', g:IncludeFname) + bw! + setlocal includeexpr= + setglobal includeexpr=<SID>IncludeFunc() + call assert_equal(expand('<SID>') .. 'IncludeFunc()', &g:includeexpr) + call assert_equal('', &includeexpr) + new + call assert_equal(expand('<SID>') .. 'IncludeFunc()', &includeexpr) + call setline(1, 'TestFile4') + let g:IncludeFname = '' + call assert_fails('normal! gf', 'E447:') + call assert_equal('TestFile4', g:IncludeFname) + bw! set includeexpr& delfunc s:IncludeFunc bw! |