vim-patch:8.1.2357: no test with wrong argument for rand()

Problem:    No test with wrong argument for rand().
Solution:   Add a test case.
68e9e5f7fc
This commit is contained in:
Sean Dewar 2022-01-10 00:49:07 +00:00
parent c97614d98f
commit cc7ccf6d31
No known key found for this signature in database
GPG Key ID: 08CC2C83AD41B581

View File

@ -26,7 +26,11 @@ func Test_Rand()
let v = rand()
call assert_notequal(v, rand())
if has('float')
call assert_fails('echo srand(1.2)', 'E805:')
endif
call assert_fails('echo srand([1])', 'E745:')
call assert_fails('echo rand("burp")', 'E475:')
call assert_fails('echo rand([1, 2, 3])', 'E475:')
call assert_fails('echo rand([[1], 2, 3, 4])', 'E475:')
call assert_fails('echo rand([1, [2], 3, 4])', 'E475:')