[vim/vim] Some lua tests fail with lua 5.4 (#8042)

187 views
Skip to first unread message

Vladimir Lomov

unread,
Mar 30, 2021, 9:39:29 PM3/30/21
to vim/vim, Subscribed

Describe the bug
Some lua tests:

Failures:                                                                                                                                                                                                                                       
        From test_lua.vim:                                                                                                                                                                                                                      
        Found errors in Test_lua_blob():                                                                                                                                                                                                        
        command line..script /home/vladimir/pkgs/vim/src/vim/src/testdir/runtest.vim[473]..function RunTheTest[44]..Test_lua_blob line 29: Expected '[string "luaeval"]:1: attempt to call a nil value (method ''xyz'')' but got '[string "luaev
al"]:1: method ''xyz'' is not callable (a nil value)': let x = luaeval("lb:xyz(3)")                                                                                                                                                             
        Found errors in Test_lua_buffer_insert():                                                                                                                                                                                               
        command line..script /home/vladimir/pkgs/vim/src/vim/src/testdir/runtest.vim[473]..function RunTheTest[44]..Test_lua_buffer_insert line 11: Expected '[string "vim chunk"]:1: attempt to call a nil value (method ''xyz'')' but got '[st
ring "vim chunk"]:1: method ''xyz'' is not callable (a nil value)': lua vim.buffer():xyz()                                                                                                                                                      
        Found errors in Test_lua_list():                                                                                                                                                                                                        
        command line..script /home/vladimir/pkgs/vim/src/vim/src/testdir/runtest.vim[473]..function RunTheTest[44]..Test_lua_list line 34: Expected '[string "luaeval"]:1: attempt to call a nil value (method ''xyz'')' but got '[string "luaev
al"]:1: method ''xyz'' is not callable (a nil value)': let x = luaeval("ll:xyz(3)")                                                                                                                                                             
        Found errors in Test_lua_luado():                                                                                                                                                                                                       
        command line..script /home/vladimir/pkgs/vim/src/vim/src/testdir/runtest.vim[473]..function RunTheTest[44]..Test_lua_luado line 10: Expected '[string "vim chunk"]:1: attempt to call a nil value (global ''func'')' but got '[string "v
im chunk"]:1: global ''func'' is not callable (a nil value)': luado func()                                                                                                                                                                      
        Found errors in Test_lua_window():                                                                                                                                                                                                      
        command line..script /home/vladimir/pkgs/vim/src/vim/src/testdir/runtest.vim[473]..function RunTheTest[44]..Test_lua_window line 12: Expected '[string "luaeval"]:1: attempt to call a nil value (field ''xyz'')' but got '[string "luae
val"]:1: field ''xyz'' is not callable (a nil value)': let n = luaeval('vim.window().xyz()') 

failed to run with lua 5.4. Seems that lua 5.4 has changed error message. Should I bother about failding tests with lua 5.4 or compile vim vs lua 5.3 only?

Additional context
OS: Archlinux x86_64
GCC: gcc (GCC) 10.2.0
LUA: lua 5.4.3


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Bram Moolenaar

unread,
Mar 31, 2021, 3:08:49 PM3/31/21
to vim/vim, Subscribed


> failed to run with lua 5.4. Seems that lua 5.4 has changed error
> message. Should I bother about failding tests with lua 5.4 or compile
> vim vs lua 5.3 only?

We already adjust the expected errors for Lua 5.3:

call assert_fails('luado func()',
\ s:lua_53_or_later
\ ? "[string \"vim chunk\"]:1: attempt to call a nil value (global 'func')"
\ : "[string \"vim chunk\"]:1: attempt to call global 'func' (a nil value)")

Apparently we need to add a s:lua_54_or_later check.

--
On the other hand, you have different fingers.
-- Steven Wright

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Christian Brabandt

unread,
Apr 1, 2021, 10:50:39 AM4/1/21
to vim/vim, Subscribed

@vp1981 could you prepare a PR to fix those failures?

Vladimir Lomov

unread,
Apr 1, 2021, 8:52:14 PM4/1/21
to vim/vim, Subscribed

@chrisbra, I'll try to make one on weekend.

Yegappan Lakshmanan

unread,
Apr 1, 2021, 11:33:39 PM4/1/21
to vim_dev, reply+ACY5DGCPYTJZOIUMJZ...@reply.github.com, vim/vim, Subscribed
Hi,

I have made the changes. I will create a PR for this.

- Yegappan

vim-dev ML

unread,
Apr 1, 2021, 11:33:58 PM4/1/21
to vim/vim, vim-dev ML, Your activity

Hi,

I have made the changes. I will create a PR for this.

- Yegappan

On Thu, Apr 1, 2021 at 5:52 PM Vladimir Lomov ***@***.***>
wrote:

> @chrisbra <https://github.com/chrisbra>, I'll try to make one on weekend.

lacygoill

unread,
Apr 3, 2021, 11:50:27 PM4/3/21
to vim/vim, vim-dev ML, Comment

Possibly fixed by 8.2.2696 and 8.2.2699.


You are receiving this because you commented.

Vladimir Lomov

unread,
Apr 4, 2021, 12:20:38 AM4/4/21
to vim/vim, vim-dev ML, Comment

Closed #8042.


You are receiving this because you commented.

Vladimir Lomov

unread,
Apr 4, 2021, 12:20:38 AM4/4/21
to vim/vim, vim-dev ML, Comment

Hi.
vim 8.2.2706 compiles fine and passes all tests.


You are receiving this because you commented.

Reply all
Reply to author
Forward
0 new messages