]> granicus.if.org Git - vim/commitdiff
patch 8.2.4069: Vim9: import test fails on MS-Windows v8.2.4069
authorBram Moolenaar <Bram@vim.org>
Wed, 12 Jan 2022 15:15:27 +0000 (15:15 +0000)
committerBram Moolenaar <Bram@vim.org>
Wed, 12 Jan 2022 15:15:27 +0000 (15:15 +0000)
Problem:    Vim9: import test fails on MS-Windows.
Solution:   Ignore case.  Adjust test to avoid name that only differs in case.

src/eval.c
src/scriptfile.c
src/testdir/test_vim9_import.vim
src/version.c

index 7a23876f9a155ddcf2048f73e45ad3c943e16288..08804c09243c1d55fc7425623413fe2242f56aef 100644 (file)
@@ -906,7 +906,7 @@ get_lval(
                                                             NULL, TRUE) == -1)
            {
                *p = cc;
-               return FAIL;
+               return NULL;
            }
            *p = cc;
        }
@@ -5903,7 +5903,7 @@ handle_subscript(
            type_T      *type;
 
            // Found script from "import {name} as name", script item name must
-           // follow.
+           // follow.  "rettv->vval.v_number" has the script ID.
            if (**arg != '.')
            {
                if (verbose)
index 350813934a9608621a0d9a83350640b8e063de52..56186ff07e7727e849ac3f851652a93d952cccdd 100644 (file)
@@ -2156,7 +2156,7 @@ get_autoload_prefix(scriptitem_T *si)
 
     if (p == NULL)
        return NULL;
-    prefix = vim_strsave(p);
+    prefix = strlow_save(p);
     if (prefix == NULL)
        return NULL;
 
index d43012c84f8ebbb56d31757dcbd2b4a31d716054..bfc99d53194316c6743557e23214887e8b31a798 100644 (file)
@@ -1203,12 +1203,12 @@ def Test_vim9script_autoload_call()
        g:result = 'other'
      enddef
   END
-  writefile(lines, 'Xdir/autoload/other.vim')
+  writefile(lines, 'Xdir/autoload/another.vim')
 
   lines =<< trim END
       vim9script
-      import autoload 'other.vim'
-      call other.Getother()
+      import autoload 'another.vim'
+      call another.Getother()
       assert_equal('other', g:result)
   END
   CheckScriptSuccess(lines)
index 74b03e47c1cd4f2a24bc966c3eb13b23bd84c876..a931516a9a60cbd5c8e8ab0a764f325b55b98bfc 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4069,
 /**/
     4068,
 /**/