1
0
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:
Yegappan Lakshmanan
2024-05-19 09:06:50 +02:00
committed by Christian Brabandt
parent 5f75714730
commit 4776e64e72
10 changed files with 76 additions and 15 deletions

View File

@@ -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)