vim-patch:8.2.1383: test 49 is old style

Problem:    Test 49 is old style.
Solution:   Convert test cases to new style. (Yegappan Lakshmanan,
            closes vim/vim#6638)

9470a4d88a

Cherry-pick AssertException() from patch 8.2.1146.
This commit is contained in:
zeertzjq 2022-11-05 20:25:07 +08:00
parent 42e7c7fc9c
commit 8d6a217b9a
4 changed files with 1170 additions and 1193 deletions

View File

@ -364,4 +364,19 @@ func GetMessages()
return msg_list
endfunc
" Run the list of commands in 'cmds' and look for 'errstr' in exception.
" Note that assert_fails() cannot be used in some places and this function
" can be used.
func AssertException(cmds, errstr)
let save_exception = ''
try
for cmd in a:cmds
exe cmd
endfor
catch
let save_exception = v:exception
endtry
call assert_match(a:errstr, save_exception)
endfunc
" vim: shiftwidth=2 sts=2 expandtab

View File

@ -1,18 +1,9 @@
Results of test49.vim:
*** Test 52: OK (1247112011)
*** Test 53: OK (131071)
*** Test 54: OK (2047)
*** Test 55: OK (1023)
*** Test 56: OK (511)
*** Test 57: OK (2147450880)
*** Test 58: OK (624945)
*** Test 59: OK (2038431743)
*** Test 60: OK (311511339)
*** Test 61: OK (374889517)
*** Test 62: OK (286331153)
*** Test 63: OK (236978127)
*** Test 64: OK (1499645335)
*** Test 65: OK (70187)
*** Test 66: OK (5464)
*** Test 67: OK (212514423)
*** Test 68: OK (212514423)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff