diff options
| author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-07-06 22:20:25 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-07-06 22:32:45 -0400 |
| commit | 41ccdb1ef204f61a4e923c9c0fbae2f1d0f4db36 (patch) | |
| tree | 04ac08e4fca36ef5adb1cedf7ae119f271a44b39 /src/nvim/testdir/test_vimscript.vim | |
| parent | 336ce02a6eeebe14e606014ea873e815922ea344 (diff) | |
| download | rneovim-41ccdb1ef204f61a4e923c9c0fbae2f1d0f4db36.tar.gz rneovim-41ccdb1ef204f61a4e923c9c0fbae2f1d0f4db36.tar.bz2 rneovim-41ccdb1ef204f61a4e923c9c0fbae2f1d0f4db36.zip | |
vim-patch:8.0.1140: still old style tests
Problem: Still old style tests.
Solution: Convert two tests to new style. (Yegappan Lakshmanan)
https://github.com/vim/vim/commit/bb3e6416f157f68799ccb6070fa2f91df6780e79
Diffstat (limited to 'src/nvim/testdir/test_vimscript.vim')
| -rw-r--r-- | src/nvim/testdir/test_vimscript.vim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_vimscript.vim b/src/nvim/testdir/test_vimscript.vim index 2357482b2c..42176d8d34 100644 --- a/src/nvim/testdir/test_vimscript.vim +++ b/src/nvim/testdir/test_vimscript.vim @@ -1273,6 +1273,26 @@ func Test_user_command_with_bang() delcommand Nieuw endfunc +" Test for script-local function +func <SID>DoLast() + call append(line('$'), "last line") +endfunc + +func s:DoNothing() + call append(line('$'), "nothing line") +endfunc + +func Test_script_local_func() + set nocp viminfo+=nviminfo + new + nnoremap <buffer> _x :call <SID>DoNothing()<bar>call <SID>DoLast()<bar>delfunc <SID>DoNothing<bar>delfunc <SID>DoLast<cr> + + normal _x + call assert_equal('nothing line', getline(2)) + call assert_equal('last line', getline(3)) + enew! | close +endfunc + "------------------------------------------------------------------------------- " Modelines {{{1 " vim: ts=8 sw=4 tw=80 fdm=marker |