comparison src/testdir/test_match.vim @ 21265:6a4806e326dd v8.2.1183

patch 8.2.1183: assert_fails() checks the last error message Commit: https://github.com/vim/vim/commit/9b7bf9e98f06ece595fed7a3ff53ecce89797a53 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 11 22:14:59 2020 +0200 patch 8.2.1183: assert_fails() checks the last error message Problem: assert_fails() checks the last error message. Solution: Check the first error, it is more relevant. Fix all the tests that rely on the old behavior.
author Bram Moolenaar <Bram@vim.org>
date Sat, 11 Jul 2020 22:30:07 +0200
parents f3c72001de63
children baec4e1cee43
comparison
equal deleted inserted replaced
21264:f3bdfe1d9359 21265:6a4806e326dd
158 call assert_fails('match Error /x/ x', 'E488:') 158 call assert_fails('match Error /x/ x', 'E488:')
159 endfunc 159 endfunc
160 160
161 func Test_matchadd_error() 161 func Test_matchadd_error()
162 call assert_fails("call matchadd('GroupDoesNotExist', 'X')", 'E28:') 162 call assert_fails("call matchadd('GroupDoesNotExist', 'X')", 'E28:')
163 call assert_fails("call matchadd('Search', '\\(')", 'E475:') 163 call assert_fails("call matchadd('Search', '\\(')", 'E54:')
164 call assert_fails("call matchadd('Search', 'XXX', 1, 123, 1)", 'E715:') 164 call assert_fails("call matchadd('Search', 'XXX', 1, 123, 1)", 'E715:')
165 call assert_fails("call matchadd('Error', 'XXX', 1, 3)", 'E798:') 165 call assert_fails("call matchadd('Error', 'XXX', 1, 3)", 'E798:')
166 call assert_fails("call matchadd('Error', 'XXX', 1, 0)", 'E799:') 166 call assert_fails("call matchadd('Error', 'XXX', 1, 0)", 'E799:')
167 call assert_fails("call matchadd('Error', 'XXX', [], 0)", 'E745:') 167 call assert_fails("call matchadd('Error', 'XXX', [], 0)", 'E745:')
168 call assert_equal(-1, matchadd('', 'pat')) 168 call assert_equal(-1, matchadd('', 'pat'))