0
0
mirror of https://github.com/vim/vim.git synced 2025-10-28 09:27:14 -04:00

patch 8.2.3858: Vim9: not enough tests

Problem:    Vim9: not enough tests.
Solution:   Add tests for :try/:catch and :redir. Add missing type check.
This commit is contained in:
Bram Moolenaar
2021-12-20 10:55:35 +00:00
parent 2f9f4ccfc8
commit 003312b1d2
4 changed files with 63 additions and 7 deletions

View File

@@ -1558,6 +1558,23 @@ def Test_redir_to_var()
redir END
END
CheckDefFailure(lines, 'E1141:')
lines =<< trim END
var text: string
redir => text
echo 'hello'
redir > Xfile
redir END
END
CheckDefFailure(lines, 'E1185:')
lines =<< trim END
var text: number
redir => text
echo 'hello'
redir END
END
CheckDefFailure(lines, 'E1012:')
enddef
def Test_echo_void()