Patch 8.2.1192
Problem: Lua test fails with older Lua version.
Solution: Adjust expected error messages. (closes #6444)
Files: src/testdir/test_lua.vim
*** ../vim-8.2.1191/src/testdir/test_lua.vim 2020-07-11 22:49:56.047213793 +0200
--- src/testdir/test_lua.vim 2020-07-12 18:30:08.590758807 +0200
***************
*** 179,190 ****
" 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')
lua co = coroutine.create(function () print("hi") end)
call assert_fails("call luaeval('vim.call(\"type\", co)')",
! \ '[string "luaeval"]:1: lua: cannot convert value')
lua co = nil
! call assert_fails("call luaeval('vim.call(\"abc\")')", ['E117:', '\[string "luaeval"]:1: lua: call_vim_function failed'])
endfunc
" Test vim.fn.*
--- 179,196 ----
" 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)')",
! \ 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)')",
! \ 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:', s:lua_53_or_later ? '\[string "luaeval"]:1: lua: call_vim_function failed'
! \ : 'lua: call_vim_function failed'])
endfunc
" Test vim.fn.*
***************
*** 525,531 ****
lua d = {}
lua d[''] = 10
call assert_fails("let t = luaeval('vim.dict(d)')",
! \ '[string "luaeval"]:1: table has empty key')
let d = {}
lua x = vim.eval('d')
call assert_fails("lua x[''] = 10", '[string "vim chunk"]:1: empty key')
--- 531,539 ----
lua d = {}
lua d[''] = 10
call assert_fails("let t = luaeval('vim.dict(d)')",
! \ 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')
*** ../vim-8.2.1191/src/version.c 2020-07-12 17:31:05.574115558 +0200
--- src/version.c 2020-07-12 18:31:59.146270462 +0200
***************
*** 756,757 ****
--- 756,759 ----
{ /* Add new patch number below this line */
+ /**/
+ 1192,
/**/
--
hundred-and-one symptoms of being an internet addict:
15. Your heart races faster and beats irregularly each time you see a new WWW
site address in print or on TV, even though you've never had heart
problems before.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///