comparison src/testdir/test34.in @ 5473:60a5b7b82016 v7.4.086

updated for version 7.4.086 Problem: Skipping over an expression when not evaluating it does not work properly for dict members. Solution: Skip over unrecognized expression. (ZyX)
author Bram Moolenaar <bram@vim.org>
date Mon, 11 Nov 2013 04:25:53 +0100
parents 085f14642fe8
children
comparison
equal deleted inserted replaced
5472:3f4e943e122a 5473:60a5b7b82016
1 Test for user functions. 1 Test for user functions.
2 Also test an <expr> mapping calling a function. 2 Also test an <expr> mapping calling a function.
3 Also test that a builtin function cannot be replaced. 3 Also test that a builtin function cannot be replaced.
4 Also test for regression when calling arbitrary expression.
4 5
5 STARTTEST 6 STARTTEST
6 :so small.vim 7 :so small.vim
7 :function Table(title, ...) 8 :function Table(title, ...)
8 : let ret = a:title 9 : let ret = a:title
60 (one 61 (one
61 (two 62 (two
62 [(one again:call append(line('$'), max([1, 2, 3])) 63 [(one again:call append(line('$'), max([1, 2, 3]))
63 :call extend(g:, {'max': function('min')}) 64 :call extend(g:, {'max': function('min')})
64 :call append(line('$'), max([1, 2, 3])) 65 :call append(line('$'), max([1, 2, 3]))
65 :$-7,$w! test.out 66 :try
67 : " Regression: the first line below used to throw ?E110: Missing ')'?
68 : " Second is here just to prove that this line is correct when not skipping
69 : " rhs of &&.
70 : $put =(0&&(function('tr'))(1, 2, 3))
71 : $put =(1&&(function('tr'))(1, 2, 3))
72 :catch
73 : $put ='!!! Unexpected exception:'
74 : $put =v:exception
75 :endtry
76 :$-9,$w! test.out
66 :delfunc Table 77 :delfunc Table
67 :delfunc Compute 78 :delfunc Compute
68 :delfunc Expr1 79 :delfunc Expr1
69 :delfunc Expr2 80 :delfunc Expr2
70 :delfunc ListItem 81 :delfunc ListItem