Skip to content

Commit

Permalink
patch 8.2.3810: Vim9: expr4 test fails on MS-Windows
Browse files Browse the repository at this point in the history
Problem:    Vim9: expr4 test fails on MS-Windows.
Solution:   Do not give an error for a missing function name when skipping.
  • Loading branch information
brammool committed Dec 14, 2021
1 parent 7509ad8 commit b334137
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -2001,7 +2001,7 @@ eval_func(
// Need to make a copy, in case evaluating the arguments makes
// the name invalid.
s = vim_strsave(s);
if (s == NULL || *s == NUL || (flags & EVAL_CONSTANT))
if (s == NULL || (evaluate && (*s == NUL || (flags & EVAL_CONSTANT))))
ret = FAIL;
else
{
Expand Down
12 changes: 10 additions & 2 deletions src/testdir/test_vim9_expr.vim
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,16 @@ def Test_expr4_equal()
assert_equal(false, function('g:Test_expr4_equal', [123]) == function('g:Test_expr4_is', [123]))
assert_equal(false, function('g:Test_expr4_equal', [123]) == function('g:Test_expr4_equal', [999]))

# TODO: this unexpectedly sometimes fails on Appveyor
if !has('win32')
if true
var OneFunc: func
var TwoFunc: func
OneFunc = function('len')
TwoFunc = function('len')
assert_equal(true, OneFunc('abc') == TwoFunc('123'))
endif

# check this doesn't fail when skipped
if false
var OneFunc: func
var TwoFunc: func
OneFunc = function('len')
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
3810,
/**/
3809,
/**/
Expand Down

0 comments on commit b334137

Please sign in to comment.