forked from aniani/vim
patch 9.1.1092: tests: fix expected return code for python 3.13 on Windows
Problem: tests: fix expected return code for python 3.13 on Windows Solution: Check for return code 1 or 123 on Windows There is a regression with python 3.13 on Windows, that it no longer prints the requested error code, but instead exits with return code 1, which breaks the test-suite. So let's check for either exit code 1 or 123 in tests Test_terminal_duplicate_eof_arg() and Test_terminal_eof_arg() This will probably be fixed on the Python side, see the pull request python/cpython#129901 but in the meantime, let's allow both error codes. related: #16599 related: python/cpython#129900 Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -944,7 +944,15 @@ func Test_terminal_eof_arg()
|
|||||||
call WaitFor({-> getline('$') =~ 'hello'})
|
call WaitFor({-> getline('$') =~ 'hello'})
|
||||||
call assert_equal('hello', getline('$'))
|
call assert_equal('hello', getline('$'))
|
||||||
endif
|
endif
|
||||||
call assert_equal(123, bufnr()->term_getjob()->job_info().exitval)
|
let exitval = bufnr()->term_getjob()->job_info().exitval
|
||||||
|
if !has('win32')
|
||||||
|
call assert_equal(123, exitval)
|
||||||
|
else
|
||||||
|
" python 3.13 on Windows returns exit code 1
|
||||||
|
" older versions returned correctly exit code 123
|
||||||
|
" https://github.com/python/cpython/issues/129900
|
||||||
|
call assert_match('1\|123', exitval)
|
||||||
|
endif
|
||||||
%bwipe!
|
%bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
@@ -976,7 +984,15 @@ func Test_terminal_duplicate_eof_arg()
|
|||||||
call WaitFor({-> getline('$') =~ 'hello'})
|
call WaitFor({-> getline('$') =~ 'hello'})
|
||||||
call assert_equal('hello', getline('$'))
|
call assert_equal('hello', getline('$'))
|
||||||
endif
|
endif
|
||||||
call assert_equal(123, bufnr()->term_getjob()->job_info().exitval)
|
let exitval = bufnr()->term_getjob()->job_info().exitval
|
||||||
|
if !has('win32')
|
||||||
|
call assert_equal(123, exitval)
|
||||||
|
else
|
||||||
|
" python 3.13 on Windows returns exit code 1
|
||||||
|
" older versions returned correctly exit code 123
|
||||||
|
" https://github.com/python/cpython/issues/129900
|
||||||
|
call assert_match('1\|123', exitval)
|
||||||
|
endif
|
||||||
%bwipe!
|
%bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
@@ -704,6 +704,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1092,
|
||||||
/**/
|
/**/
|
||||||
1091,
|
1091,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user