diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-14 18:57:45 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-14 18:57:45 +0000 |
commit | b334137acffd7a2b2ab8524e54d4c55ebf4518ea (patch) | |
tree | b6aae7de00566795aeb04bd264630f3fdc484474 | |
parent | 7509ad8b0fad56f88288977decbeca3640406c82 (diff) |
patch 8.2.3810: Vim9: expr4 test fails on MS-Windowsv8.2.3810
Problem: Vim9: expr4 test fails on MS-Windows.
Solution: Do not give an error for a missing function name when skipping.
-rw-r--r-- | src/eval.c | 2 | ||||
-rw-r--r-- | src/testdir/test_vim9_expr.vim | 12 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 13 insertions, 3 deletions
diff --git a/src/eval.c b/src/eval.c index 0a85b909d0..d9f44b2c80 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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 { diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim index a357b11d48..1f695bc707 100644 --- a/src/testdir/test_vim9_expr.vim +++ b/src/testdir/test_vim9_expr.vim @@ -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') diff --git a/src/version.c b/src/version.c index c7f6fe796a..6ce7173ea3 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3810, +/**/ 3809, /**/ 3808, |