Mercurial > vim
comparison src/testdir/test_expr.vim @ 10207:9415453b7bbd v8.0.0004
commit https://github.com/vim/vim/commit/5582ef14384525e8cec86016876d97a6b32dd548
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Sep 14 22:16:13 2016 +0200
patch 8.0.0004
Problem: A string argument for function() that is not a function name
results in an error message with NULL. (Christian Brabandt)
Solution: Use the argument for the error message.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 14 Sep 2016 22:30:10 +0200 |
parents | a6068b90c873 |
children | d76ccdacb41e |
comparison
equal
deleted
inserted
replaced
10206:d5e814245456 | 10207:9415453b7bbd |
---|---|
437 func Test_function_with_funcref() | 437 func Test_function_with_funcref() |
438 let s:f = function('type') | 438 let s:f = function('type') |
439 let s:fref = function(s:f) | 439 let s:fref = function(s:f) |
440 call assert_equal(v:t_string, s:fref('x')) | 440 call assert_equal(v:t_string, s:fref('x')) |
441 call assert_fails("call function('s:f')", 'E700:') | 441 call assert_fails("call function('s:f')", 'E700:') |
442 | |
443 call assert_fails("call function('foo()')", 'E475:') | |
444 call assert_fails("call function('foo()')", 'foo()') | |
442 endfunc | 445 endfunc |
443 | 446 |
444 func Test_funcref() | 447 func Test_funcref() |
445 func! One() | 448 func! One() |
446 return 1 | 449 return 1 |