forked from aniani/vim
patch 8.2.1183: assert_fails() checks the last error message
Problem: assert_fails() checks the last error message.
Solution: Check the first error, it is more relevant. Fix all the tests
that rely on the old behavior.
This commit is contained in:
@@ -31,11 +31,11 @@ func Test_Rand()
|
||||
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:')
|
||||
call assert_fails('echo rand([1, 2, [3], 4])', 'E475:')
|
||||
call assert_fails('echo rand([1, 2, 3, [4]])', 'E475:')
|
||||
call assert_fails('echo rand([1, 2, 3])', 'E730:')
|
||||
call assert_fails('echo rand([[1], 2, 3, 4])', 'E730:')
|
||||
call assert_fails('echo rand([1, [2], 3, 4])', 'E730:')
|
||||
call assert_fails('echo rand([1, 2, [3], 4])', 'E730:')
|
||||
call assert_fails('echo rand([1, 2, 3, [4]])', 'E730:')
|
||||
|
||||
call test_settime(0)
|
||||
endfunc
|
||||
|
||||
Reference in New Issue
Block a user