0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

patch 7.4.2305

Problem:    Marks, writefile and nested function tests are old style.
Solution:   Turn them into new style tests. (Yegappan Lakshmanan)
This commit is contained in:
Bram Moolenaar
2016-09-01 22:19:47 +02:00
parent 417ccd7138
commit 19a1669ffc
12 changed files with 84 additions and 122 deletions

View File

@@ -0,0 +1,32 @@
"Tests for nested functions
"
function! NestedFunc()
fu! Func1()
let g:text .= 'Func1 '
endfunction
call Func1()
fu! s:func2()
let g:text .= 's:func2 '
endfunction
call s:func2()
fu! s:_func3()
let g:text .= 's:_func3 '
endfunction
call s:_func3()
let fn = 'Func4'
fu! {fn}()
let g:text .= 'Func4 '
endfunction
call {fn}()
let fn = 'func5'
fu! s:{fn}()
let g:text .= 's:func5'
endfunction
call s:{fn}()
endfunction
function! Test_nested_functions()
let g:text = ''
call NestedFunc()
call assert_equal('Func1 s:func2 s:_func3 Func4 s:func5', g:text)
endfunction