From 8cf51376b842e0060edf08bd2e5bd9933c552ecf Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 8 May 2023 15:31:38 +0100 Subject: patch 9.0.1524: passing -1 for bool is not always rejected Problem: Passing -1 for bool is not always rejected. Solution: Check for error in a better way. (closes #12358) --- src/testdir/test_expr.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/testdir/test_expr.vim') diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim index b3a8c49c5..68cbeb59d 100644 --- a/src/testdir/test_expr.vim +++ b/src/testdir/test_expr.vim @@ -161,7 +161,8 @@ func Test_strcharpart() END call v9.CheckLegacyAndVim9Success(lines) - call assert_fails('echo strcharpart("", 0, 0, {})', ['E728:', 'E728:']) + call assert_fails('call strcharpart("", 0, 0, {})', ['E728:', 'E728:']) + call assert_fails('call strcharpart("", 0, 0, -1)', ['E1023:', 'E1023:']) endfunc func Test_getreg_empty_list() -- cgit v1.2.1