Skip to content

Commit 2482069

Browse files
committed
patch 8.0.1365: when one channel test fails others fail as well
Problem: When one channel test fails others fail as well. Solution: Stop the job after a failure. Also add a couple of tests to the list of flaky tests.
1 parent 22044dc commit 2482069

3 files changed

Lines changed: 20 additions & 11 deletions

File tree

src/testdir/runtest.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ let s:flaky = [
251251
\ 'Test_exit_callback_interval()',
252252
\ 'Test_nb_basic()',
253253
\ 'Test_oneshot()',
254+
\ 'Test_paused()',
254255
\ 'Test_pipe_through_sort_all()',
255256
\ 'Test_pipe_through_sort_some()',
256257
\ 'Test_quoteplus()',
@@ -259,6 +260,7 @@ let s:flaky = [
259260
\ 'Test_terminal_composing_unicode()',
260261
\ 'Test_terminal_noblock()',
261262
\ 'Test_terminal_redir_file()',
263+
\ 'Test_terminal_tmap()',
262264
\ 'Test_with_partial_callback()',
263265
\ ]
264266

src/testdir/test_channel.vim

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,19 +1694,23 @@ func Test_cwd()
16941694
let g:envstr = ''
16951695
if has('win32')
16961696
let expect = $TEMP
1697-
call job_start(['cmd', '/c', 'echo %CD%'], {'callback': {ch,msg->execute(":let g:envstr .= msg")}, 'cwd': expect})
1697+
let job = job_start(['cmd', '/c', 'echo %CD%'], {'callback': {ch,msg->execute(":let g:envstr .= msg")}, 'cwd': expect})
16981698
else
16991699
let expect = $HOME
1700-
call job_start(['pwd'], {'callback': {ch,msg->execute(":let g:envstr .= msg")}, 'cwd': expect})
1700+
let job = job_start(['pwd'], {'callback': {ch,msg->execute(":let g:envstr .= msg")}, 'cwd': expect})
17011701
endif
1702-
call WaitFor('"" != g:envstr')
1703-
let expect = substitute(expect, '[/\\]$', '', '')
1704-
let g:envstr = substitute(g:envstr, '[/\\]$', '', '')
1705-
if $CI != '' && stridx(g:envstr, '/private/') == 0
1706-
let g:envstr = g:envstr[8:]
1707-
endif
1708-
call assert_equal(expect, g:envstr)
1709-
unlet g:envstr
1702+
try
1703+
call WaitFor('"" != g:envstr')
1704+
let expect = substitute(expect, '[/\\]$', '', '')
1705+
let g:envstr = substitute(g:envstr, '[/\\]$', '', '')
1706+
if $CI != '' && stridx(g:envstr, '/private/') == 0
1707+
let g:envstr = g:envstr[8:]
1708+
endif
1709+
call assert_equal(expect, g:envstr)
1710+
finally
1711+
call job_stop(job)
1712+
unlet g:envstr
1713+
endtry
17101714
endfunc
17111715

17121716
function Ch_test_close_lambda(port)
@@ -1731,7 +1735,7 @@ endfunc
17311735
func s:test_list_args(cmd, out, remove_lf)
17321736
try
17331737
let g:out = ''
1734-
call job_start([s:python, '-c', a:cmd], {'callback': {ch, msg -> execute('let g:out .= msg')}, 'out_mode': 'raw'})
1738+
let job = job_start([s:python, '-c', a:cmd], {'callback': {ch, msg -> execute('let g:out .= msg')}, 'out_mode': 'raw'})
17351739
call WaitFor('"" != g:out')
17361740
if has('win32')
17371741
let g:out = substitute(g:out, '\r', '', 'g')
@@ -1741,6 +1745,7 @@ func s:test_list_args(cmd, out, remove_lf)
17411745
endif
17421746
call assert_equal(a:out, g:out)
17431747
finally
1748+
call job_stop(job)
17441749
unlet g:out
17451750
endtry
17461751
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,8 @@ static char *(features[]) =
771771

772772
static int included_patches[] =
773773
{ /* Add new patch number below this line */
774+
/**/
775+
1365,
774776
/**/
775777
1364,
776778
/**/

0 commit comments

Comments
 (0)