Mercurial > vim
diff src/testdir/test_vim9_script.vim @ 25082:5c7a09cf97a1 v8.2.3078
patch 8.2.3078: Vim9: profile test fails
Commit: https://github.com/vim/vim/commit/834193afd7195bc96026d2aed696d64f8075cd35
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jun 30 20:39:15 2021 +0200
patch 8.2.3078: Vim9: profile test fails
Problem: Vim9: profile test fails.
Solution: Make throw in :catch jump to :finally.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 30 Jun 2021 20:45:04 +0200 |
parents | 146c9720e563 |
children | 075790758d11 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -803,6 +803,25 @@ def Test_try_catch_nested() endtry endtry assert_equal(['1', '2', '3', '4', '5', '6'], l) + + l = [] + try + try + l->add('1') + throw 'foo' + l->add('x') + catch + l->add('2') + throw 'bar' + l->add('x') + finally + l->add('3') + endtry + l->add('x') + catch /bar/ + l->add('4') + endtry + assert_equal(['1', '2', '3', '4'], l) enddef def TryOne(): number