1
0
forked from aniani/vim

patch 9.0.1631: passing wrong variable type to option gives multiple errors

Problem:    Passing a wrong variable type to an option gives multiple errors.
Solution:   Bail out early on failure. (closes #12504)
This commit is contained in:
zeertzjq
2023-06-14 16:39:54 +01:00
committed by Bram Moolenaar
parent 8d687a7424
commit 4c7cb372c1
9 changed files with 161 additions and 124 deletions

View File

@@ -3944,7 +3944,7 @@ def Test_setwinvar()
v9.CheckDefAndScriptFailure(['setwinvar("a", "b", 1)'], ['E1013: Argument 1: type mismatch, expected number but got string', 'E1210: Number required for argument 1'])
v9.CheckDefAndScriptFailure(['setwinvar(1, 2, "c")'], ['E1013: Argument 2: type mismatch, expected string but got number', 'E1174: String required for argument 2'])
assert_fails('setwinvar(1, "", 10)', 'E461: Illegal variable name')
assert_fails('setwinvar(0, "&rulerformat", true)', 'E928:')
assert_fails('setwinvar(0, "&rulerformat", true)', ['E928:', 'E928:'])
enddef
def Test_sha256()