aboutsummaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_eval.in21
-rw-r--r--src/testdir/test_eval.ok2
2 files changed, 22 insertions, 1 deletions
diff --git a/src/testdir/test_eval.in b/src/testdir/test_eval.in
index 44eeabfe73..a142036522 100644
--- a/src/testdir/test_eval.in
+++ b/src/testdir/test_eval.in
@@ -1,5 +1,5 @@
STARTTEST
-:" function name includes a colon
+:" function name not starting with a capital
:try
: func! g:test()
: echo "test"
@@ -15,9 +15,28 @@ STARTTEST
: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()
+: let @d = 'called Foo()'
+:endfunction
+:let b:my_func = function('Foo')
+:let @d = 'xxx'
+:call b:my_func()
+:endfunction
+:" clean up
:%d
:pu a
:pu b
+:pu c
+:pu d
:1d
:wq! test.out
ENDTEST
diff --git a/src/testdir/test_eval.ok b/src/testdir/test_eval.ok
index 8aaac316c5..601a4261c8 100644
--- a/src/testdir/test_eval.ok
+++ b/src/testdir/test_eval.ok
@@ -1,2 +1,4 @@
Vim(function):E128: Function name must start with a capital or "s:": g:test()
Vim(function):E128: Function name must start with a capital or "s:": test2() "#
+Vim(function):E128: Function name must start with a capital or "s:": b:test()
+called Foo()