]> granicus.if.org Git - vim/commitdiff
patch 8.2.3810: Vim9: expr4 test fails on MS-Windows v8.2.3810
authorBram Moolenaar <Bram@vim.org>
Tue, 14 Dec 2021 18:57:45 +0000 (18:57 +0000)
committerBram Moolenaar <Bram@vim.org>
Tue, 14 Dec 2021 18:57:45 +0000 (18:57 +0000)
Problem:    Vim9: expr4 test fails on MS-Windows.
Solution:   Do not give an error for a missing function name when skipping.

src/eval.c
src/testdir/test_vim9_expr.vim
src/version.c

index 0a85b909d0e1d6178dda453982ada545c89050c6..d9f44b2c8087d0a98db517a4e7d78a7a7df93849 100644 (file)
@@ -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
     {
index a357b11d48accf16942f8f1058d3b80852831a05..1f695bc7076e77153369c4d67094df5bf9a6ec49 100644 (file)
@@ -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')
index c7f6fe796a8483c5bf5101df021eaf5de06e8f52..6ce7173ea3943c4040bbc21acc31f5065645baeb 100644 (file)
@@ -749,6 +749,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3810,
 /**/
     3809,
 /**/