view src/testdir/test_nested_function.in @ 7224:42bf8902d4da v7.4.921

commit https://github.com/vim/vim/commit/cd1c55f706c2f9b8310b8a9fc1f8226c7fd19372 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Nov 10 20:52:04 2015 +0100 patch 7.4.921 Problem: Missing proto file update. (Randall W. Morris) Solution: Add the missing line for mch_ishidden.
author Christian Brabandt <cb@256bit.org>
date Tue, 10 Nov 2015 21:00:05 +0100
parents 750a6986aa86
children
line wrap: on
line source

Tests for Nested function                vim: set ft=vim :

STARTTEST
:so small.vim
:fu! NestedFunc()
:  fu! Func1()
:    $put ='Func1'
:  endfunction
:  call Func1()
:  fu! s:func2()
:    $put ='s:func2'
:  endfunction
:  call s:func2()
:  fu! s:_func3()
:    $put ='s:_func3'
:  endfunction
:  call s:_func3()
:  let fn = 'Func4'
:  fu! {fn}()
:    $put ='Func4'
:  endfunction
:  call {fn}()
:  let fn = 'func5'
:  fu! s:{fn}()
:    $put ='s:func5'
:  endfunction
:  call s:{fn}()
:endfunction
:call NestedFunc()
:/^result:/,$w! test.out
:qa!
ENDTEST

result: