diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-07-16 17:31:53 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-07-16 17:31:53 +0200 |
commit | bdb620560b3199828f9852e9c9453d56e951a5f9 (patch) | |
tree | 3901feff854f6353d8f82127f936289ba5a73cf6 /src/testdir | |
parent | c2ece10274c01c50534bfdcd4d8a03229356101d (diff) | |
download | vim-bdb620560b3199828f9852e9c9453d56e951a5f9.zip |
updated for version 7.3.603
Problem: It is possible to add replace builtin functions by calling
extend() on g:.
Solution: Add a flag to a dict to indicate it is a scope. Check for
existing functions. (ZyX)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test34.in | 6 | ||||
-rw-r--r-- | src/testdir/test34.ok | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/testdir/test34.in b/src/testdir/test34.in index 28fd00c4b..5abc140be 100644 --- a/src/testdir/test34.in +++ b/src/testdir/test34.in @@ -1,5 +1,6 @@ Test for user functions. Also test an <expr> mapping calling a function. +Also test that a builtin function cannot be replaced. STARTTEST :so small.vim @@ -58,7 +59,10 @@ XX+-XX ---*--- (one (two -[(one again:$-5,$w! test.out +[(one again:call append(line('$'), max([1, 2, 3])) +:call extend(g:, {'max': function('min')}) +:call append(line('$'), max([1, 2, 3])) +:$-7,$w! test.out :delfunc Table :delfunc Compute :delfunc Expr1 diff --git a/src/testdir/test34.ok b/src/testdir/test34.ok index d71183dce..605381227 100644 --- a/src/testdir/test34.ok +++ b/src/testdir/test34.ok @@ -4,3 +4,5 @@ XX111-XX 1. one 2. two 1. one again +3 +3 |