# HG changeset patch # User Bram Moolenaar # Date 1642001406 -3600 # Node ID 9897dd3c6530184ebafc54d91423ec19c99f2e48 # Parent ca2134e1c90a318d3677f1185cab1926fd96a50a patch 8.2.4069: Vim9: import test fails on MS-Windows Commit: https://github.com/vim/vim/commit/5d9826973d9f4c6ffbb5648676bb628660c62906 Author: Bram Moolenaar 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. diff --git a/src/eval.c b/src/eval.c --- 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) diff --git a/src/scriptfile.c b/src/scriptfile.c --- 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; diff --git a/src/testdir/test_vim9_import.vim b/src/testdir/test_vim9_import.vim --- 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) diff --git a/src/version.c b/src/version.c --- 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,