Mercurial > vim
comparison src/testdir/test_vim9_disassemble.vim @ 27541:8af6e7761b0c v8.2.4297
patch 8.2.4297: Vim9: not all code covered by tests
Commit: https://github.com/vim/vim/commit/21ebb0899ecf9049c3e1c9cbc2e06fd8e2a99e06
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Feb 4 21:58:58 2022 +0000
patch 8.2.4297: Vim9: not all code covered by tests
Problem: Vim9: not all code covered by tests.
Solution: Add a couple more tests.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 04 Feb 2022 23:00:05 +0100 |
parents | a14c4d3e3260 |
children | 5c4ab8d4472c |
comparison
equal
deleted
inserted
replaced
27540:de25fd9bb1a6 | 27541:8af6e7761b0c |
---|---|
2485 '15 DROP\_s*' .. | 2485 '15 DROP\_s*' .. |
2486 '16 RETURN void*', | 2486 '16 RETURN void*', |
2487 res) | 2487 res) |
2488 enddef | 2488 enddef |
2489 | 2489 |
2490 def s:TryCatch() | |
2491 try | |
2492 echo "try" | |
2493 catch /error/ | |
2494 echo "caught" | |
2495 endtry | |
2496 enddef | |
2497 | |
2498 def Test_debug_try_catch() | |
2499 var res = execute('disass debug s:TryCatch') | |
2500 assert_match('<SNR>\d*_TryCatch\_s*' .. | |
2501 'try\_s*' .. | |
2502 '0 DEBUG line 1-1 varcount 0\_s*' .. | |
2503 '1 TRY catch -> 7, endtry -> 17\_s*' .. | |
2504 'echo "try"\_s*' .. | |
2505 '2 DEBUG line 2-2 varcount 0\_s*' .. | |
2506 '3 PUSHS "try"\_s*' .. | |
2507 '4 ECHO 1\_s*' .. | |
2508 'catch /error/\_s*' .. | |
2509 '5 DEBUG line 3-3 varcount 0\_s*' .. | |
2510 '6 JUMP -> 17\_s*' .. | |
2511 '7 DEBUG line 4-3 varcount 0\_s*' .. | |
2512 '8 PUSH v:exception\_s*' .. | |
2513 '9 PUSHS "error"\_s*' .. | |
2514 '10 COMPARESTRING =\~\_s*' .. | |
2515 '11 JUMP_IF_FALSE -> 17\_s*' .. | |
2516 '12 CATCH\_s*' .. | |
2517 'echo "caught"\_s*' .. | |
2518 '13 DEBUG line 4-4 varcount 0\_s*' .. | |
2519 '14 PUSHS "caught"\_s*' .. | |
2520 '15 ECHO 1\_s*' .. | |
2521 'endtry\_s*' .. | |
2522 '16 DEBUG line 5-5 varcount 0\_s*' .. | |
2523 '17 ENDTRY\_s*' .. | |
2524 '\d\+ RETURN void', | |
2525 res) | |
2526 enddef | |
2527 | |
2490 func s:Legacy() dict | 2528 func s:Legacy() dict |
2491 echo 'legacy' | 2529 echo 'legacy' |
2492 endfunc | 2530 endfunc |
2493 | 2531 |
2494 def s:UseMember() | 2532 def s:UseMember() |