comparison src/testdir/test_vimscript.vim @ 23191:3e7723bab4e5 v8.2.2141

patch 8.2.2141: a user command with try/catch may not catch an expression error Commit: https://github.com/vim/vim/commit/8143a53c533bc7776c57e5db063d185bdd5750f3 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 13 20:26:29 2020 +0100 patch 8.2.2141: a user command with try/catch may not catch an expression error Problem: A user command with try/catch may not catch an expression error. Solution: When an expression fails check for following "|". (closes https://github.com/vim/vim/issues/7469)
author Bram Moolenaar <Bram@vim.org>
date Sun, 13 Dec 2020 20:30:04 +0100
parents ff21e2962490
children b545334ae654
comparison
equal deleted inserted replaced
23190:42b507fffe8f 23191:3e7723bab4e5
6823 \ 'append', 6823 \ 'append',
6824 \ 'abc', 6824 \ 'abc',
6825 \ ]) 6825 \ ])
6826 call assert_report("Shouldn't be able to define function") 6826 call assert_report("Shouldn't be able to define function")
6827 catch 6827 catch
6828 call assert_exception('Vim(function):E126: Missing :endfunction') 6828 call assert_exception('Vim(function):E1145: Missing heredoc end marker: .')
6829 endtry 6829 endtry
6830 6830
6831 " :change 6831 " :change
6832 try 6832 try
6833 call DefineFunction('T_Change', [ 6833 call DefineFunction('T_Change', [
6843 \ 'change', 6843 \ 'change',
6844 \ 'abc', 6844 \ 'abc',
6845 \ ]) 6845 \ ])
6846 call assert_report("Shouldn't be able to define function") 6846 call assert_report("Shouldn't be able to define function")
6847 catch 6847 catch
6848 call assert_exception('Vim(function):E126: Missing :endfunction') 6848 call assert_exception('Vim(function):E1145: Missing heredoc end marker: .')
6849 endtry 6849 endtry
6850 6850
6851 " :insert 6851 " :insert
6852 try 6852 try
6853 call DefineFunction('T_Insert', [ 6853 call DefineFunction('T_Insert', [
6863 \ 'insert', 6863 \ 'insert',
6864 \ 'abc', 6864 \ 'abc',
6865 \ ]) 6865 \ ])
6866 call assert_report("Shouldn't be able to define function") 6866 call assert_report("Shouldn't be able to define function")
6867 catch 6867 catch
6868 call assert_exception('Vim(function):E126: Missing :endfunction') 6868 call assert_exception('Vim(function):E1145: Missing heredoc end marker: .')
6869 endtry 6869 endtry
6870 endfunc 6870 endfunc
6871 6871
6872 "------------------------------------------------------------------------------- 6872 "-------------------------------------------------------------------------------
6873 " Test 96: line continuation {{{1 6873 " Test 96: line continuation {{{1