mirror of
https://github.com/neovim/neovim.git
synced 2024-12-21 03:35:02 -07:00
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:
parent
c97614d98f
commit
cc7ccf6d31
@ -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:')
|
||||
|
Loading…
Reference in New Issue
Block a user