1
0
forked from aniani/vim

patch 8.2.4410: Vim9: some code not covered by tests

Problem:    Vim9: some code not covered by tests.
Solution:   Add a few more tests. Remove dead code.
This commit is contained in:
Bram Moolenaar
2022-02-17 19:44:07 +00:00
parent 6296d1e60e
commit 0c7f2610de
6 changed files with 55 additions and 32 deletions

View File

@@ -1556,6 +1556,14 @@ def Test_expr6()
v9.CheckDefExecAndScriptFailure(['echo 1 / 0'], 'E1154', 1)
v9.CheckDefExecAndScriptFailure(['echo 1 % 0'], 'E1154', 1)
if has('float')
v9.CheckDefExecAndScriptFailure([
'g:one = 1.0'
'g:two = 2.0'
'echo g:one % g:two'
], 'E804', 3)
endif
lines =<< trim END
var n = 0
eval 1 / n