Mercurial > vim
diff src/testdir/test_vim9_disassemble.vim @ 25004:70f55a30f03c v8.2.3039
patch 8.2.3039: Vim9: breakpoint at a comment line does not work
Commit: https://github.com/vim/vim/commit/8cec9273d2518f2a9abcbd326722a2eba38d2a13
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jun 23 20:20:53 2021 +0200
patch 8.2.3039: Vim9: breakpoint at a comment line does not work
Problem: Vim9: breakpoint at a comment line does not work.
Solution: Add the comment line number to the debug instruction.
(closes #8429)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 23 Jun 2021 20:30:03 +0200 |
parents | 71b1e2ef0069 |
children | 21b70bab366c |
line wrap: on
line diff
--- a/src/testdir/test_vim9_disassemble.vim +++ b/src/testdir/test_vim9_disassemble.vim @@ -2176,7 +2176,9 @@ def Test_silent_return() enddef def s:Profiled(): string + # comment echo "profiled" + # comment var some = "some text" return "done" enddef @@ -2187,18 +2189,20 @@ def Test_profiled() endif var res = execute('disass profile s:Profiled') assert_match('<SNR>\d*_Profiled\_s*' .. + '# comment\_s*' .. 'echo "profiled"\_s*' .. - '\d PROFILE START line 1\_s*' .. + '\d PROFILE START line 2\_s*' .. '\d PUSHS "profiled"\_s*' .. '\d ECHO 1\_s*' .. + '# comment\_s*' .. 'var some = "some text"\_s*' .. '\d PROFILE END\_s*' .. - '\d PROFILE START line 2\_s*' .. + '\d PROFILE START line 4\_s*' .. '\d PUSHS "some text"\_s*' .. '\d STORE $0\_s*' .. 'return "done"\_s*' .. '\d PROFILE END\_s*' .. - '\d PROFILE START line 3\_s*' .. + '\d PROFILE START line 5\_s*' .. '\d PUSHS "done"\_s*' .. '\d\+ RETURN\_s*' .. '\d\+ PROFILE END', @@ -2208,16 +2212,18 @@ enddef def Test_debugged() var res = execute('disass debug s:Profiled') assert_match('<SNR>\d*_Profiled\_s*' .. + '# comment\_s*' .. 'echo "profiled"\_s*' .. - '\d DEBUG line 1 varcount 0\_s*' .. + '\d DEBUG line 1-2 varcount 0\_s*' .. '\d PUSHS "profiled"\_s*' .. '\d ECHO 1\_s*' .. + '# comment\_s*' .. 'var some = "some text"\_s*' .. - '\d DEBUG line 2 varcount 0\_s*' .. + '\d DEBUG line 3-4 varcount 0\_s*' .. '\d PUSHS "some text"\_s*' .. '\d STORE $0\_s*' .. 'return "done"\_s*' .. - '\d DEBUG line 3 varcount 1\_s*' .. + '\d DEBUG line 5-5 varcount 1\_s*' .. '\d PUSHS "done"\_s*' .. '\d RETURN\_s*', res)