aboutsummaryrefslogtreecommitdiff
path: root/src/testdir/test_eval.in
blob: 3722e3fe00959b960b26180ccd11aa4d26df6422 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
STARTTEST
:" function name not starting with a capital
:try
:  func! g:test()
:    echo "test"
:  endfunc
:catch
:  let @a = v:exception
:endtry
:" function name folowed by #
:try
:  func! test2() "#
:    echo "test2"
:  endfunc
:catch
:  let @b = v:exception
:endtry
:" function name includes a colon
:try
:  func! b:test()
:    echo "test"
:  endfunc
:catch
:  let @c = v:exception
:endtry
:" function name starting with/without "g:", buffer-local funcref.
:function! g:Foo(n)
:  let @d = 'called Foo(' . a:n . ')'
:endfunction
:let b:my_func = function('Foo')
:" clean up
:%d
:pu a
:pu b
:pu c
:call b:my_func(1)
:pu d
:echo g:Foo(2)
:pu d
:echo Foo(3)
:pu d
:1d
:wq! test.out
ENDTEST
start: