Mercurial > vim
changeset 26562:479022b3e7bd v8.2.3810
patch 8.2.3810: Vim9: expr4 test fails on MS-Windows
Commit: https://github.com/vim/vim/commit/b334137acffd7a2b2ab8524e54d4c55ebf4518ea
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 14 18:57:45 2021 +0000
patch 8.2.3810: Vim9: expr4 test fails on MS-Windows
Problem: Vim9: expr4 test fails on MS-Windows.
Solution: Do not give an error for a missing function name when skipping.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 14 Dec 2021 20:00:04 +0100 |
parents | 69d9b6201845 |
children | b12f084bff49 |
files | src/eval.c src/testdir/test_vim9_expr.vim src/version.c |
diffstat | 3 files changed, 13 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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 {
--- 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')