Patch 8.2.4597

5 views
Skip to first unread message

Bram Moolenaar

unread,
Mar 20, 2022, 7:47:15 AM3/20/22
to vim...@googlegroups.com

Patch 8.2.4597
Problem: LuaV_debug() not covered by tests.
Solution: Add a test. (Dominique Pellé, closes #9980)
Files: src/testdir/test_lua.vim


*** ../vim-8.2.4596/src/testdir/test_lua.vim 2022-01-28 17:19:59.474972489 +0000
--- src/testdir/test_lua.vim 2022-03-20 11:34:12.444297125 +0000
***************
*** 1192,1195 ****
--- 1192,1218 ----
augroup! Luagroup
endfunc

+ func Test_lua_debug()
+ CheckRunVimInTerminal
+
+ let buf = RunVimInTerminal('', {'rows': 10})
+ call term_sendkeys(buf, ":lua debug.debug()\n")
+ call WaitForAssert({-> assert_equal('lua_debug> ', term_getline(buf, 10))})
+
+ call term_sendkeys(buf, "foo = 42\n")
+ call WaitForAssert({-> assert_equal('lua_debug> foo = 42', term_getline(buf, 9))})
+ call WaitForAssert({-> assert_equal('lua_debug> ', term_getline(buf, 10))})
+
+ call term_sendkeys(buf, "print(foo)\n")
+ call WaitForAssert({-> assert_equal('lua_debug> print(foo)', term_getline(buf, 8))})
+ call WaitForAssert({-> assert_equal('42', term_getline(buf, 9))})
+ call WaitForAssert({-> assert_equal('lua_debug> ', term_getline(buf, 10))})
+
+ call term_sendkeys(buf, "cont\n")
+ call WaitForAssert({-> assert_match(' All$', term_getline(buf, 10))})
+
+ call StopVimInTerminal(buf)
+ call delete('XtestLuaDebug.vim')
+ endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.4596/src/version.c 2022-03-20 11:26:33.185347649 +0000
--- src/version.c 2022-03-20 11:44:58.283141059 +0000
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 4597,
/**/

--
ARTHUR: Who are you?
TALL KNIGHT: We are the Knights Who Say "Ni"!
BEDEVERE: No! Not the Knights Who Say "Ni"!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// 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 ///
Reply all
Reply to author
Forward
0 new messages