To: vim_dev@googlegroups.com Subject: Patch 8.2.4297 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4297 Problem: Vim9: not all code covered by tests. Solution: Add a couple more tests. Files: src/testdir/test_vim9_script.vim, src/testdir/test_vim9_disassemble.vim *** ../vim-8.2.4296/src/testdir/test_vim9_script.vim 2022-02-02 16:20:22.390554553 +0000 --- src/testdir/test_vim9_script.vim 2022-02-04 21:31:34.799699287 +0000 *************** *** 1580,1585 **** --- 1580,1593 ---- burp endif + if 0 + if 1 + echo nothing + elseif 1 + echo still nothing + endif + endif + # expression with line breaks skipped if false ('aaa' *** ../vim-8.2.4296/src/testdir/test_vim9_disassemble.vim 2022-01-30 15:28:26.646294975 +0000 --- src/testdir/test_vim9_disassemble.vim 2022-02-04 21:53:03.401797483 +0000 *************** *** 2487,2492 **** --- 2487,2530 ---- res) enddef + def s:TryCatch() + try + echo "try" + catch /error/ + echo "caught" + endtry + enddef + + def Test_debug_try_catch() + var res = execute('disass debug s:TryCatch') + assert_match('\d*_TryCatch\_s*' .. + 'try\_s*' .. + '0 DEBUG line 1-1 varcount 0\_s*' .. + '1 TRY catch -> 7, endtry -> 17\_s*' .. + 'echo "try"\_s*' .. + '2 DEBUG line 2-2 varcount 0\_s*' .. + '3 PUSHS "try"\_s*' .. + '4 ECHO 1\_s*' .. + 'catch /error/\_s*' .. + '5 DEBUG line 3-3 varcount 0\_s*' .. + '6 JUMP -> 17\_s*' .. + '7 DEBUG line 4-3 varcount 0\_s*' .. + '8 PUSH v:exception\_s*' .. + '9 PUSHS "error"\_s*' .. + '10 COMPARESTRING =\~\_s*' .. + '11 JUMP_IF_FALSE -> 17\_s*' .. + '12 CATCH\_s*' .. + 'echo "caught"\_s*' .. + '13 DEBUG line 4-4 varcount 0\_s*' .. + '14 PUSHS "caught"\_s*' .. + '15 ECHO 1\_s*' .. + 'endtry\_s*' .. + '16 DEBUG line 5-5 varcount 0\_s*' .. + '17 ENDTRY\_s*' .. + '\d\+ RETURN void', + res) + enddef + func s:Legacy() dict echo 'legacy' endfunc *** ../vim-8.2.4296/src/version.c 2022-02-04 21:17:54.412950056 +0000 --- src/version.c 2022-02-04 21:33:02.067567991 +0000 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4297, /**/ -- An operatingsystem is just a name you give to the rest of bloating idiosyncratic machine-based-features you left out of your editor. (author unknown) /// Bram Moolenaar -- Bram@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 ///