comparison src/testdir/test_lua.vim @ 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 e3d72ea162c3
children b48703e93488
comparison
equal deleted inserted replaced
24314:57cf042a9e93 24315:43ac86deea50
12 CheckFeature lua 12 CheckFeature lua
13 CheckFeature float 13 CheckFeature float
14 14
15 " Depending on the lua version, the error messages are different. 15 " Depending on the lua version, the error messages are different.
16 let s:luaver = split(split(systemlist('lua -v')[0], ' ')[1], '\.') 16 let s:luaver = split(split(systemlist('lua -v')[0], ' ')[1], '\.')
17 if len(s:luaver) < 3
18 " Didn't get something that looks like a version, use _VERSION.
19 let s:luaver = split(split(luaeval('_VERSION'), ' ')[1], '\.')
20 endif
17 let s:major = str2nr(s:luaver[0]) 21 let s:major = str2nr(s:luaver[0])
18 let s:minor = str2nr(s:luaver[1]) 22 let s:minor = str2nr(s:luaver[1])
19 let s:patch = str2nr(s:luaver[2]) 23 if len(s:luaver >= 3)
24 let s:patch = str2nr(s:luaver[2])
25 else
26 let s:patch = 0
27 endif
20 let s:lua_53_or_later = 0 28 let s:lua_53_or_later = 0
21 let s:lua_543_or_later = 0 29 let s:lua_543_or_later = 0
22 if (s:major == 5 && s:minor >= 3) || s:major > 5 30 if (s:major == 5 && s:minor >= 3) || s:major > 5
23 let s:lua_53_or_later = 1 31 let s:lua_53_or_later = 1
24 if (s:major == 5 32 if (s:major == 5