changeset 27080:9897dd3c6530 v8.2.4069

patch 8.2.4069: Vim9: import test fails on MS-Windows Commit: https://github.com/vim/vim/commit/5d9826973d9f4c6ffbb5648676bb628660c62906 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 12 15:15:27 2022 +0000 patch 8.2.4069: Vim9: import test fails on MS-Windows Problem: Vim9: import test fails on MS-Windows. Solution: Ignore case. Adjust test to avoid name that only differs in case.
author Bram Moolenaar <Bram@vim.org>
date Wed, 12 Jan 2022 16:30:06 +0100
parents ca2134e1c90a
children fbd98e593843
files src/eval.c src/scriptfile.c src/testdir/test_vim9_import.vim src/version.c
diffstat 4 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -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)
--- a/src/scriptfile.c
+++ b/src/scriptfile.c
@@ -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;
 
--- a/src/testdir/test_vim9_import.vim
+++ b/src/testdir/test_vim9_import.vim
@@ -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)
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    4069,
+/**/
     4068,
 /**/
     4067,