aboutsummaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorMarco Hinz <mh.codebro@gmail.com>2014-04-23 21:55:12 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-25 14:09:04 -0300
commit342764d70ee8c9f05f4389a523dfd09f0795fcd1 (patch)
tree3b19485ab56c0da0158d948f8a7724b58feaf0ea /src/testdir
parenta6e1738db31407cdde9cec1e0763f068c7d0a0ae (diff)
downloadrneovim-342764d70ee8c9f05f4389a523dfd09f0795fcd1.tar.gz
rneovim-342764d70ee8c9f05f4389a523dfd09f0795fcd1.tar.bz2
rneovim-342764d70ee8c9f05f4389a523dfd09f0795fcd1.zip
vim-patch:7.4.260
Problem: It is possible to define a function with a colon in the name. It is possible to define a function with a lower case character if a "#" appears after the name. Solution: Disallow using a colon other than with "s:". Ignore "#" after the name. https://code.google.com/p/vim/source/detail?r=6bc874e4789a0f912b4fd6b23afecf19d80b1605
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_eval.in24
-rw-r--r--src/testdir/test_eval.ok2
2 files changed, 26 insertions, 0 deletions
diff --git a/src/testdir/test_eval.in b/src/testdir/test_eval.in
new file mode 100644
index 0000000000..44eeabfe73
--- /dev/null
+++ b/src/testdir/test_eval.in
@@ -0,0 +1,24 @@
+STARTTEST
+:" function name includes a colon
+: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
+:%d
+:pu a
+:pu b
+:1d
+:wq! test.out
+ENDTEST
+start:
diff --git a/src/testdir/test_eval.ok b/src/testdir/test_eval.ok
new file mode 100644
index 0000000000..8aaac316c5
--- /dev/null
+++ b/src/testdir/test_eval.ok
@@ -0,0 +1,2 @@
+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() "#