Mercurial > vim
comparison src/testdir/test_vim9_disassemble.vim @ 24895:e61a2085c89b v8.2.2985
patch 8.2.2985: Vim9: a compiled function cannot be debugged
Commit: https://github.com/vim/vim/commit/e99d422bbd3e47620915bf89671673f0711671b4
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 13 14:01:26 2021 +0200
patch 8.2.2985: Vim9: a compiled function cannot be debugged
Problem: Vim9: a compiled function cannot be debugged.
Solution: Add initial debugging support.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 13 Jun 2021 14:15:04 +0200 |
parents | a8d64f1a223b |
children | 6235e5d3523d |
comparison
equal
deleted
inserted
replaced
24894:6270bfeab91f | 24895:e61a2085c89b |
---|---|
2151 | 2151 |
2152 def Test_profiled() | 2152 def Test_profiled() |
2153 if !has('profile') | 2153 if !has('profile') |
2154 MissingFeature 'profile' | 2154 MissingFeature 'profile' |
2155 endif | 2155 endif |
2156 var res = execute('disass! s:Profiled') | 2156 var res = execute('disass profile s:Profiled') |
2157 assert_match('<SNR>\d*_Profiled\_s*' .. | 2157 assert_match('<SNR>\d*_Profiled\_s*' .. |
2158 'echo "profiled"\_s*' .. | 2158 'echo "profiled"\_s*' .. |
2159 '\d PROFILE START line 1\_s*' .. | 2159 '\d PROFILE START line 1\_s*' .. |
2160 '\d PUSHS "profiled"\_s*' .. | 2160 '\d PUSHS "profiled"\_s*' .. |
2161 '\d ECHO 1\_s*' .. | 2161 '\d ECHO 1\_s*' .. |
2166 '\d RETURN\_s*' .. | 2166 '\d RETURN\_s*' .. |
2167 '\d PROFILE END', | 2167 '\d PROFILE END', |
2168 res) | 2168 res) |
2169 enddef | 2169 enddef |
2170 | 2170 |
2171 def Test_debugged() | |
2172 var res = execute('disass debug s:Profiled') | |
2173 assert_match('<SNR>\d*_Profiled\_s*' .. | |
2174 'echo "profiled"\_s*' .. | |
2175 '\d DEBUG line 1\_s*' .. | |
2176 '\d PUSHS "profiled"\_s*' .. | |
2177 '\d ECHO 1\_s*' .. | |
2178 'return "done"\_s*' .. | |
2179 '\d DEBUG line 2\_s*' .. | |
2180 '\d PUSHS "done"\_s*' .. | |
2181 '\d RETURN\_s*', | |
2182 res) | |
2183 enddef | |
2184 | |
2171 def s:EchoMessages() | 2185 def s:EchoMessages() |
2172 echohl ErrorMsg | echom v:exception | echohl NONE | 2186 echohl ErrorMsg | echom v:exception | echohl NONE |
2173 enddef | 2187 enddef |
2174 | 2188 |
2175 def Test_disassemble_nextcmd() | 2189 def Test_disassemble_nextcmd() |