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.
diff --git a/src/eval.c b/src/eval.c
index 7a23876..08804c0 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -906,7 +906,7 @@
NULL, TRUE) == -1)
{
*p = cc;
- return FAIL;
+ return NULL;
}
*p = cc;
}
@@ -5903,7 +5903,7 @@
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)
diff --git a/src/scriptfile.c b/src/scriptfile.c
index 3508139..56186ff 100644
--- a/src/scriptfile.c
+++ b/src/scriptfile.c
@@ -2156,7 +2156,7 @@
if (p == NULL)
return NULL;
- prefix = vim_strsave(p);
+ prefix = strlow_save(p);
if (prefix == NULL)
return NULL;
diff --git a/src/testdir/test_vim9_import.vim b/src/testdir/test_vim9_import.vim
index d43012c..bfc99d5 100644
--- a/src/testdir/test_vim9_import.vim
+++ b/src/testdir/test_vim9_import.vim
@@ -1203,12 +1203,12 @@
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)
diff --git a/src/version.c b/src/version.c
index 74b03e4..a931516 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4069,
+/**/
4068,
/**/
4067,