changeset 24315:43ac86deea50 v8.2.2698

patch 8.2.2698: Lua test fails on MS-Windows Commit: https://github.com/vim/vim/commit/b9c6b6fb73711f64943340b2c3f0bdf8744451b6 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 3 15:35:50 2021 +0200 patch 8.2.2698: Lua test fails on MS-Windows Problem: Lua test fails on MS-Windows. Solution: Fall back to old method if "lua -v" doesn't work.
author Bram Moolenaar <Bram@vim.org>
date Sat, 03 Apr 2021 15:45:14 +0200
parents 57cf042a9e93
children 593bdc37770c
files src/testdir/test_lua.vim src/version.c
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_lua.vim
+++ b/src/testdir/test_lua.vim
@@ -14,9 +14,17 @@ CheckFeature float
 
 " Depending on the lua version, the error messages are different.
 let s:luaver = split(split(systemlist('lua -v')[0], ' ')[1], '\.')
+if len(s:luaver) < 3
+  " Didn't get something that looks like a version, use _VERSION.
+  let s:luaver = split(split(luaeval('_VERSION'), ' ')[1], '\.')
+endif
 let s:major = str2nr(s:luaver[0])
 let s:minor = str2nr(s:luaver[1])
-let s:patch = str2nr(s:luaver[2])
+if len(s:luaver >= 3)
+  let s:patch = str2nr(s:luaver[2])
+else
+  let s:patch = 0
+endif
 let s:lua_53_or_later = 0
 let s:lua_543_or_later = 0
 if (s:major == 5 && s:minor >= 3) || s:major > 5
--- 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 */
 /**/
+    2698,
+/**/
     2697,
 /**/
     2696,