mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.1.2357: no test with wrong argument for rand()
Problem: No test with wrong argument for rand(). Solution: Add a test case.
This commit is contained in:
@@ -25,7 +25,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:')
|
||||
|
@@ -737,6 +737,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
2357,
|
||||
/**/
|
||||
2356,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user