patch 9.1.1325: tests: not checking error numbers properly
Problem: tests: not checking error numbers properly.
Solution: Add a trailing comma to avoid matching a different error
number with the same prefix (zeertzjq)
closes: #17159
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim
index be95c64..8bba1f0 100644
--- a/src/testdir/test_expr.vim
+++ b/src/testdir/test_expr.vim
@@ -257,10 +257,10 @@
call v9.CheckLegacyAndVim9Success(lines)
call assert_equal([0, 1, 2], --3->range())
- call v9.CheckDefAndScriptFailure(['eval --3->range()'], 'E15')
+ call v9.CheckDefAndScriptFailure(['eval --3->range()'], 'E15:')
call assert_equal(1, !+-+0)
- call v9.CheckDefAndScriptFailure(['eval !+-+0'], 'E15')
+ call v9.CheckDefAndScriptFailure(['eval !+-+0'], 'E15:')
endfunc
func Test_option_value()
@@ -874,7 +874,7 @@
" Test for errors in expression evaluation
func Test_expr_eval_error()
call v9.CheckLegacyAndVim9Failure(["VAR i = 'abc' .. []"], ['E730:', 'E1105:', 'E730:'])
- call v9.CheckLegacyAndVim9Failure(["VAR l = [] + 10"], ['E745:', 'E1051:', 'E745'])
+ call v9.CheckLegacyAndVim9Failure(["VAR l = [] + 10"], ['E745:', 'E1051:', 'E745:'])
call v9.CheckLegacyAndVim9Failure(["VAR v = 10 + []"], ['E745:', 'E1051:', 'E745:'])
call v9.CheckLegacyAndVim9Failure(["VAR v = 10 / []"], ['E745:', 'E1036:', 'E745:'])
call v9.CheckLegacyAndVim9Failure(["VAR v = -{}"], ['E728:', 'E1012:', 'E728:'])