Mercurial > vim
changeset 28146:483a8d6cf8b0 v8.2.4597
patch 8.2.4597: LuaV_debug() not covered by tests
Commit: https://github.com/vim/vim/commit/b6643d10d39c493951a6bbf3264003d35adeb811
Author: Dominique Pelle <dominique.pelle@gmail.com>
Date: Sun Mar 20 11:46:01 2022 +0000
patch 8.2.4597: LuaV_debug() not covered by tests
Problem: LuaV_debug() not covered by tests.
Solution: Add a test. (Dominique Pell?, closes https://github.com/vim/vim/issues/9980)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 20 Mar 2022 13:00:02 +0100 |
parents | 0cae2e05ef93 |
children | 7fd4693a77e6 |
files | src/testdir/test_lua.vim src/version.c |
diffstat | 2 files changed, 25 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_lua.vim +++ b/src/testdir/test_lua.vim @@ -1192,4 +1192,27 @@ func Test_lua_multiple_commands() 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