aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarco Hinz <mh.codebro@gmail.com>2014-04-29 16:36:35 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-29 15:13:57 -0300
commitf30a83f10120320ea7c2aa1d480fcdb673aa0323 (patch)
tree0ab904df9bc2dde5d7f9522c9cdd8f90fef45484 /src
parent48fa2be92be96b348ffd5c812846178f7835fe15 (diff)
downloadrneovim-f30a83f10120320ea7c2aa1d480fcdb673aa0323.tar.gz
rneovim-f30a83f10120320ea7c2aa1d480fcdb673aa0323.tar.bz2
rneovim-f30a83f10120320ea7c2aa1d480fcdb673aa0323.zip
Refactor test_eval
Diffstat (limited to 'src')
-rw-r--r--src/testdir/test_eval.in28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/testdir/test_eval.in b/src/testdir/test_eval.in
index 3722e3fe00..3ab85301cf 100644
--- a/src/testdir/test_eval.in
+++ b/src/testdir/test_eval.in
@@ -1,45 +1,43 @@
STARTTEST
+
:" function name not starting with a capital
:try
: func! g:test()
: echo "test"
: endfunc
:catch
-: let @a = v:exception
+: $put =v:exception
:endtry
+
:" function name folowed by #
:try
: func! test2() "#
: echo "test2"
: endfunc
:catch
-: let @b = v:exception
+: $put =v:exception
:endtry
+
:" function name includes a colon
:try
: func! b:test()
: echo "test"
: endfunc
:catch
-: let @c = v:exception
+: $put =v:exception
:endtry
+
:" function name starting with/without "g:", buffer-local funcref.
:function! g:Foo(n)
-: let @d = 'called Foo(' . a:n . ')'
+: $put ='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
+
+:$-5,$w! test.out
+:q!
+
ENDTEST
-start:
+