summaryrefslogtreecommitdiffstats
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-04-23 20:43:41 +0200
committerBram Moolenaar <Bram@vim.org>2014-04-23 20:43:41 +0200
commiteccb7fc3158877d93194e6b7c0f7e542b4544137 (patch)
treec4fbd5ab6d78bd46b25d796a2b9451c1e0b63f31 /src/testdir
parent163d0da508d1a206e6a6ee7e2a34fa0a583ae16c (diff)
updated for version 7.4.264v7.4.264
Problem: Can't define a function starting with "g:". Can't assign a funcref to a buffer-local variable. Solution: Skip "g:" at the start of a function name. Don't check for colons when assigning to a variable.
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_eval.in18
-rw-r--r--src/testdir/test_eval.okbin10736 -> 10827 bytes
2 files changed, 17 insertions, 1 deletions
diff --git a/src/testdir/test_eval.in b/src/testdir/test_eval.in
index cb942011be..4919694bea 100644
--- a/src/testdir/test_eval.in
+++ b/src/testdir/test_eval.in
@@ -144,7 +144,7 @@ endfun
:delcommand AR
:call garbagecollect(1)
:"
-:" function name includes a colon
+:" function name not starting with capital
:try
:func! g:test()
:echo "test"
@@ -153,6 +153,15 @@ endfun
:$put =v:exception
:endtry
:"
+:" function name includes a colon
+:try
+:func! b:test()
+:echo "test"
+:endfunc
+:catch
+:$put =v:exception
+:endtry
+:"
:" function name folowed by #
:try
:func! test2() "#
@@ -162,6 +171,13 @@ endfun
:$put =v:exception
:endtry
:"
+:" function name starting with/without "g:", buffer-local funcref.
+:function! g:Foo()
+: $put ='called Foo()'
+:endfunction
+:let b:my_func = function('Foo')
+:call b:my_func()
+:"
:/^start:/+1,$wq! test.out
:" vim: et ts=4 isk-=\: fmr=???,???
:call getchar()
diff --git a/src/testdir/test_eval.ok b/src/testdir/test_eval.ok
index a0d0e458ce..57383be748 100644
--- a/src/testdir/test_eval.ok
+++ b/src/testdir/test_eval.ok
Binary files differ