aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_eval.in
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2014-05-12 02:25:17 +0200
committerEliseo Martínez <eliseomarmol@gmail.com>2014-05-15 20:46:01 +0200
commitda51dc9cf202772f60bd2da975dbef257bd9237c (patch)
tree5c16b93238a153f55634e9323077f30c8133970c /src/nvim/testdir/test_eval.in
parentffe61e5ba1721340ca51d56bae3ddaca415fb5bc (diff)
downloadrneovim-da51dc9cf202772f60bd2da975dbef257bd9237c.tar.gz
rneovim-da51dc9cf202772f60bd2da975dbef257bd9237c.tar.bz2
rneovim-da51dc9cf202772f60bd2da975dbef257bd9237c.zip
Introduce nvim namespace: Move files.
Move files from src/ to src/nvim/. - src/nvim/ becomes the new root dir for nvim executable sources. - src/libnvim/ is planned to become root dir of the neovim library.
Diffstat (limited to 'src/nvim/testdir/test_eval.in')
-rw-r--r--src/nvim/testdir/test_eval.in57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_eval.in b/src/nvim/testdir/test_eval.in
new file mode 100644
index 0000000000..c34f5cb50e
--- /dev/null
+++ b/src/nvim/testdir/test_eval.in
@@ -0,0 +1,57 @@
+STARTTEST
+
+:e test.out
+:%d
+
+:" function name not starting with a capital
+:try
+: func! g:test()
+: echo "test"
+: endfunc
+:catch
+: $put =v:exception
+:endtry
+
+:" function name folowed by #
+:try
+: func! test2() "#
+: echo "test2"
+: endfunc
+:catch
+: $put =v:exception
+:endtry
+
+:" function name includes a colon
+:try
+: func! b:test()
+: echo "test"
+: endfunc
+:catch
+: $put =v:exception
+:endtry
+
+:" function name starting with/without "g:", buffer-local funcref.
+:function! g:Foo(n)
+: $put ='called Foo(' . a:n . ')'
+:endfunction
+:let b:my_func = function('Foo')
+:call b:my_func(1)
+:echo g:Foo(2)
+:echo Foo(3)
+
+:" script-local function used in Funcref must exist.
+:so test_eval_func.vim
+
+:" using $ instead of '$' must give an error
+:try
+: call append($, 'foobar')
+:catch
+: $put =v:exception
+:endtry
+
+:1d
+:w
+:qa!
+
+ENDTEST
+