From 41ccdb1ef204f61a4e923c9c0fbae2f1d0f4db36 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 6 Jul 2018 22:20:25 -0400 Subject: 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 --- src/nvim/testdir/test_vimscript.vim | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/nvim/testdir/test_vimscript.vim') 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 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 _x :call DoNothing()call DoLast()delfunc DoNothingdelfunc DoLast + + 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 -- cgit