forked from aniani/vim
patch 9.1.0419: eval.c not sufficiently tested
Problem: eval.c not sufficiently tested
Solution: Add a few more additional tests for eval.c,
(Yegappan Lakshmanan)
closes: #14799
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
5f75714730
commit
4776e64e72
@@ -2510,6 +2510,11 @@ def Test_for_loop()
|
||||
reslist->add('x')
|
||||
endfor
|
||||
assert_equal(['x', 'x', 'x'], reslist)
|
||||
|
||||
# Test for trying to use the loop variable "_" inside the loop
|
||||
for _ in "a"
|
||||
assert_fails('echo _', 'E1181: Cannot use an underscore here')
|
||||
endfor
|
||||
END
|
||||
v9.CheckDefAndScriptSuccess(lines)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user