From 8a1c1013153a7f08e014facac883a1987985d6db Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 7 May 2020 14:07:25 +0200 Subject: patch 8.2.0706: Vim9: using assert_fails() causes function to finish Problem: Vim9: using assert_fails() causes function to finish. Solution: Check did_emsg instead of called_emsg. --- src/testdir/test_vim9_disassemble.vim | 2 ++ src/testdir/test_vim9_script.vim | 7 ------- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'src/testdir') diff --git a/src/testdir/test_vim9_disassemble.vim b/src/testdir/test_vim9_disassemble.vim index 11703416d..5c4ecd290 100644 --- a/src/testdir/test_vim9_disassemble.vim +++ b/src/testdir/test_vim9_disassemble.vim @@ -17,6 +17,7 @@ def s:ScriptFuncLoad(arg: string) buffers echo arg echo local + echo &lines echo v:version echo s:scriptvar echo g:globalvar @@ -42,6 +43,7 @@ def Test_disassemble_load() ' EXEC \+buffers.*' .. ' LOAD arg\[-1\].*' .. ' LOAD $0.*' .. + ' LOADOPT &lines.*' .. ' LOADV v:version.*' .. ' LOADS s:scriptvar from .*test_vim9_disassemble.vim.*' .. ' LOADG g:globalvar.*' .. diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim index 40aae46a1..7768eb082 100644 --- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -1311,13 +1311,6 @@ def Test_vim9_comment() 'catch /pat/# comment', 'endtry', ], 'E488:') - CheckScriptFailure([ - 'vim9script', - 'try', - ' throw "pat"', - 'catch /pat/# comment', - 'endtry', - ], 'E605:') CheckDefFailure([ 'try', 'echo "yes"', -- cgit v1.2.1