summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-07-12 18:33:53 +0200
committerBram Moolenaar <Bram@vim.org>2020-07-12 18:33:53 +0200
commitb898a029b01866b1dbe07521e153d54917b9527d (patch)
tree764c10a863e62525b968f5863946545210052fdd /src
parent985116ae0b7b3ef17e0c0ea2669068dd6b3b39c7 (diff)
patch 8.2.1192: Lua test fails with older Lua versionv8.2.1192
Problem: Lua test fails with older Lua version. Solution: Adjust expected error messages. (closes #6444)
Diffstat (limited to 'src')
-rw-r--r--src/testdir/test_lua.vim16
-rw-r--r--src/version.c2
2 files changed, 14 insertions, 4 deletions
diff --git a/src/testdir/test_lua.vim b/src/testdir/test_lua.vim
index 136649eac9..d21c40de5b 100644
--- a/src/testdir/test_lua.vim
+++ b/src/testdir/test_lua.vim
@@ -179,12 +179,18 @@ func Test_lua_call()
" Error cases
call assert_fails("call luaeval('vim.call(\"min\", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21)')",
- \ '[string "luaeval"]:1: Function called with too many arguments')
+ \ s:lua_53_or_later
+ \ ? '[string "luaeval"]:1: Function called with too many arguments'
+ \ : 'Function called with too many arguments')
lua co = coroutine.create(function () print("hi") end)
call assert_fails("call luaeval('vim.call(\"type\", co)')",
- \ '[string "luaeval"]:1: lua: cannot convert value')
+ \ s:lua_53_or_later
+ \ ? '[string "luaeval"]:1: lua: cannot convert value'
+ \ : 'lua: cannot convert value')
lua co = nil
- call assert_fails("call luaeval('vim.call(\"abc\")')", ['E117:', '\[string "luaeval"]:1: lua: call_vim_function failed'])
+ call assert_fails("call luaeval('vim.call(\"abc\")')",
+ \ ['E117:', s:lua_53_or_later ? '\[string "luaeval"]:1: lua: call_vim_function failed'
+ \ : 'lua: call_vim_function failed'])
endfunc
" Test vim.fn.*
@@ -525,7 +531,9 @@ func Test_lua_dict()
lua d = {}
lua d[''] = 10
call assert_fails("let t = luaeval('vim.dict(d)')",
- \ '[string "luaeval"]:1: table has empty key')
+ \ s:lua_53_or_later
+ \ ? '[string "luaeval"]:1: table has empty key'
+ \ : 'table has empty key')
let d = {}
lua x = vim.eval('d')
call assert_fails("lua x[''] = 10", '[string "vim chunk"]:1: empty key')
diff --git a/src/version.c b/src/version.c
index 487303edc9..d165232881 100644
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1192,
+/**/
1191,
/**/
1190,