0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

patch 8.2.2886: various pieces of code not covered by tests

Problem:    Various pieces of code not covered by tests.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #8255)
This commit is contained in:
Yegappan Lakshmanan
2021-05-25 20:14:00 +02:00
committed by Bram Moolenaar
parent 872bee557e
commit 34fcb69724
9 changed files with 53 additions and 0 deletions

View File

@@ -1580,6 +1580,8 @@ def Test_expr7t()
var ln: list<number> = [<number>g:anint, <number>g:thefour]
var nr = <number>234
assert_equal(234, nr)
var b: bool = <bool>1
assert_equal(true, b)
var text =
<string>
'text'
@@ -1591,6 +1593,7 @@ def Test_expr7t()
CheckDefAndScriptFailure(["var x = <nr>123"], 'E1010:', 1)
CheckDefFailure(["var x = <number>"], 'E1097:', 3)
CheckDefFailure(["var x = <number>string(1)"], 'E1012:', 1)
CheckScriptFailure(['vim9script', "var x = <number>"], 'E15:', 2)
CheckDefAndScriptFailure(["var x = <number >123"], 'E1068:', 1)
CheckDefAndScriptFailure(["var x = <number 123"], 'E1104:', 1)