comparison src/testdir/test_user_func.vim @ 19689:da98d2ed8dc5 v8.2.0401

patch 8.2.0401: not enough test coverage for evalvars.c Commit: https://github.com/vim/vim/commit/8dfcce3a78ccb520cc9d09081f998091494c50bf Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 18 19:32:26 2020 +0100 patch 8.2.0401: not enough test coverage for evalvars.c Problem: Not enough test coverage for evalvars.c. Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5804)
author Bram Moolenaar <Bram@vim.org>
date Wed, 18 Mar 2020 19:45:04 +0100
parents c6c9d91d8290
children 2c4d9ca33769
comparison
equal deleted inserted replaced
19688:8d01c76e0bc7 19689:da98d2ed8dc5
85 85
86 call assert_equal(3, max([1, 2, 3])) 86 call assert_equal(3, max([1, 2, 3]))
87 call assert_fails("call extend(g:, {'max': function('min')})", 'E704') 87 call assert_fails("call extend(g:, {'max': function('min')})", 'E704')
88 call assert_equal(3, max([1, 2, 3])) 88 call assert_equal(3, max([1, 2, 3]))
89 89
90 " Try to overwrite an user defined function with a function reference
91 call assert_fails("let Expr1 = function('min')", 'E705:')
92
90 " Regression: the first line below used to throw ?E110: Missing ')'? 93 " Regression: the first line below used to throw ?E110: Missing ')'?
91 " Second is here just to prove that this line is correct when not skipping 94 " Second is here just to prove that this line is correct when not skipping
92 " rhs of &&. 95 " rhs of &&.
93 call assert_equal(0, (0 && (function('tr'))(1, 2, 3))) 96 call assert_equal(0, (0 && (function('tr'))(1, 2, 3)))
94 call assert_equal(1, (1 && (function('tr'))(1, 2, 3))) 97 call assert_equal(1, (1 && (function('tr'))(1, 2, 3)))