aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorMichael Ennen <mike.ennen@gmail.com>2016-12-17 18:01:24 -0700
committerMichael Ennen <mike.ennen@gmail.com>2017-02-14 17:38:17 -0700
commit1e3c0efa0f3d41563f91097d04b3616848d5eb62 (patch)
tree31841b7e60bd87f9ffc6d8992d2df65994fff5ae /src/nvim/testdir
parentd7c798cd863611754c5ff1c92fbc0b9c12479a47 (diff)
downloadrneovim-1e3c0efa0f3d41563f91097d04b3616848d5eb62.tar.gz
rneovim-1e3c0efa0f3d41563f91097d04b3616848d5eb62.tar.bz2
rneovim-1e3c0efa0f3d41563f91097d04b3616848d5eb62.zip
vim-patch:7.4.2134
Problem: No error for using function() badly. Solution: Check for passing wrong function name. (Ken Takata) https://github.com/vim/vim/commit/b54c3ff3174dbb5dfbfcabdf95200b047beaa644
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_expr.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_expr.vim b/src/nvim/testdir/test_expr.vim
index 0c4a91298c..7e43af9ebd 100644
--- a/src/nvim/testdir/test_expr.vim
+++ b/src/nvim/testdir/test_expr.vim
@@ -143,3 +143,10 @@ func Test_substitute_expr_arg()
call assert_fails("call substitute('xxx', '.', {m -> string(extend(m, ['x']))}, '')", 'E742:')
call assert_fails("call substitute('xxx', '.', {m -> string(remove(m, 1))}, '')", 'E742:')
endfunc
+
+func Test_function_with_funcref()
+ let s:f = function('type')
+ let s:fref = function(s:f)
+ call assert_equal(v:t_string, s:fref('x'))
+ call assert_fails("call function('s:f')", 'E700:')
+endfunc