diff options
Diffstat (limited to 'src/testdir/test_vim9_script.vim')
-rw-r--r-- | src/testdir/test_vim9_script.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim index b64f05e89d..2aca20ad8d 100644 --- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -4783,6 +4783,19 @@ def Test_multidefer_with_exception() v9.CheckSourceSuccess(lines) enddef +" Test for using ":defer" inside an if statement with a false condition +def Test_defer_skipped() + var lines =<< trim END + def Foo() + if false + defer execute('echow "hello"', "") + endif + enddef + defcompile + END + v9.CheckSourceSuccess(lines) +enddef + " Keep this last, it messes up highlighting. def Test_substitute_cmd() new |