Patch 8.2.2187

5 views
Skip to first unread message

Bram Moolenaar

unread,
Dec 22, 2020, 6:52:39 AM12/22/20
to vim...@googlegroups.com

Patch 8.2.2187
Problem: Python 3 test fails sometimes. (Christian Brabandt)
Solution: Accept two SystemError messages.
Files: src/testdir/test_python3.vim


*** ../vim-8.2.2186/src/testdir/test_python3.vim 2020-12-21 16:02:58.486392542 +0100
--- src/testdir/test_python3.vim 2020-12-22 12:48:24.984559376 +0100
***************
*** 12,17 ****
--- 12,18 ----
return {'a': 1}
endfunction

+ let s:system_error_pat = 'Vim(py3):SystemError: \(<built-in function eval> returned NULL without setting an error\|error return without exception set\)'

" This function should be called first. This sets up python functions used by
" the other tests.
***************
*** 539,549 ****
func Test_python3_list()
" Try to convert a null List
call AssertException(["py3 t = vim.eval('test_null_list()')"],
! \ 'Vim(py3):SystemError: <built-in function eval> returned NULL without setting an error')

" Try to convert a List with a null List item
call AssertException(["py3 t = vim.eval('[test_null_list()]')"],
! \ 'Vim(py3):SystemError: <built-in function eval> returned NULL without setting an error')

" Try to bind a null List variable (works because an empty list is used)
let cmds =<< trim END
--- 540,550 ----
func Test_python3_list()
" Try to convert a null List
call AssertException(["py3 t = vim.eval('test_null_list()')"],
! \ s:system_error_pat)

" Try to convert a List with a null List item
call AssertException(["py3 t = vim.eval('[test_null_list()]')"],
! \ s:system_error_pat)

" Try to bind a null List variable (works because an empty list is used)
let cmds =<< trim END
***************
*** 582,592 ****
func Test_python3_dict()
" Try to convert a null Dict
call AssertException(["py3 t = vim.eval('test_null_dict()')"],
! \ 'Vim(py3):SystemError: <built-in function eval> returned NULL without setting an error')

" Try to convert a Dict with a null List value
call AssertException(["py3 t = vim.eval(\"{'a' : test_null_list()}\")"],
! \ 'Vim(py3):SystemError: <built-in function eval> returned NULL without setting an error')

" Try to convert a Dict with a null string key
py3 t = vim.eval("{test_null_string() : 10}")
--- 583,593 ----
func Test_python3_dict()
" Try to convert a null Dict
call AssertException(["py3 t = vim.eval('test_null_dict()')"],
! \ s:system_error_pat)

" Try to convert a Dict with a null List value
call AssertException(["py3 t = vim.eval(\"{'a' : test_null_list()}\")"],
! \ s:system_error_pat)

" Try to convert a Dict with a null string key
py3 t = vim.eval("{test_null_string() : 10}")
***************
*** 1119,1125 ****
let l = [test_null_list()]
py3 ll = vim.bindeval('l')
call AssertException(["py3 x = ll[:]"],
! \ "Vim(py3):SystemError: error return without exception set")
endfunc

" Vars
--- 1120,1126 ----
let l = [test_null_list()]
py3 ll = vim.bindeval('l')
call AssertException(["py3 x = ll[:]"],
! \ s:system_error_pat)
endfunc

" Vars
*** ../vim-8.2.2186/src/version.c 2020-12-22 12:20:04.541293877 +0100
--- src/version.c 2020-12-22 12:49:12.232404739 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2187,
/**/

--
An operatingsystem is just a name you give to the rest of bloating
idiosyncratic machine-based-features you left out of your editor.
(author unknown)

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages