Mercurial > vim
annotate src/testdir/test_nested_function.in @ 7439:63a96fadf679 v7.4.1023
commit https://github.com/vim/vim/commit/2c15f6aa8fd057721e35d03523577b41cf7aaad5
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 2 15:00:30 2016 +0100
patch 7.4.1023
Problem: The distribution files for MS-Windows use CR-LF, which is
inconsistent with what one gets from github.
Solution: Use LF in the distribution files.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 02 Jan 2016 15:15:04 +0100 |
parents | 750a6986aa86 |
children |
rev | line source |
---|---|
6440 | 1 Tests for Nested function vim: set ft=vim : |
2 | |
3 STARTTEST | |
4 :so small.vim | |
5 :fu! NestedFunc() | |
6 : fu! Func1() | |
7 : $put ='Func1' | |
8 : endfunction | |
9 : call Func1() | |
10 : fu! s:func2() | |
11 : $put ='s:func2' | |
12 : endfunction | |
13 : call s:func2() | |
14 : fu! s:_func3() | |
15 : $put ='s:_func3' | |
16 : endfunction | |
17 : call s:_func3() | |
18 : let fn = 'Func4' | |
19 : fu! {fn}() | |
20 : $put ='Func4' | |
21 : endfunction | |
22 : call {fn}() | |
23 : let fn = 'func5' | |
24 : fu! s:{fn}() | |
25 : $put ='s:func5' | |
26 : endfunction | |
27 : call s:{fn}() | |
28 :endfunction | |
29 :call NestedFunc() | |
30 :/^result:/,$w! test.out | |
31 :qa! | |
32 ENDTEST | |
33 | |
34 result: |