summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-12-02 16:38:12 +0100
committerBram Moolenaar <Bram@vim.org>2017-12-02 16:38:12 +0100
commit24820691e6ba9dae41ef16a3d3e55589843b34f4 (patch)
treea313908795b56c5069af29f32ba0272afc2869d5
parent22044dc31788d9f1c2da7725269884d9923b4795 (diff)
downloadvim-git-24820691e6ba9dae41ef16a3d3e55589843b34f4.tar.gz
patch 8.0.1365: when one channel test fails others fail as wellv8.0.1365
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.
-rw-r--r--src/testdir/runtest.vim2
-rw-r--r--src/testdir/test_channel.vim27
-rw-r--r--src/version.c2
3 files changed, 20 insertions, 11 deletions
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index c953d6d7c..8a4a9b7a0 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -251,6 +251,7 @@ let s:flaky = [
\ 'Test_exit_callback_interval()',
\ 'Test_nb_basic()',
\ 'Test_oneshot()',
+ \ 'Test_paused()',
\ 'Test_pipe_through_sort_all()',
\ 'Test_pipe_through_sort_some()',
\ 'Test_quoteplus()',
@@ -259,6 +260,7 @@ let s:flaky = [
\ 'Test_terminal_composing_unicode()',
\ 'Test_terminal_noblock()',
\ 'Test_terminal_redir_file()',
+ \ 'Test_terminal_tmap()',
\ 'Test_with_partial_callback()',
\ ]
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index 459ee13fa..034bd3977 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -1694,19 +1694,23 @@ func Test_cwd()
let g:envstr = ''
if has('win32')
let expect = $TEMP
- call job_start(['cmd', '/c', 'echo %CD%'], {'callback': {ch,msg->execute(":let g:envstr .= msg")}, 'cwd': expect})
+ let job = job_start(['cmd', '/c', 'echo %CD%'], {'callback': {ch,msg->execute(":let g:envstr .= msg")}, 'cwd': expect})
else
let expect = $HOME
- call job_start(['pwd'], {'callback': {ch,msg->execute(":let g:envstr .= msg")}, 'cwd': expect})
+ let job = job_start(['pwd'], {'callback': {ch,msg->execute(":let g:envstr .= msg")}, 'cwd': expect})
endif
- call WaitFor('"" != g:envstr')
- let expect = substitute(expect, '[/\\]$', '', '')
- let g:envstr = substitute(g:envstr, '[/\\]$', '', '')
- if $CI != '' && stridx(g:envstr, '/private/') == 0
- let g:envstr = g:envstr[8:]
- endif
- call assert_equal(expect, g:envstr)
- unlet g:envstr
+ try
+ call WaitFor('"" != g:envstr')
+ let expect = substitute(expect, '[/\\]$', '', '')
+ let g:envstr = substitute(g:envstr, '[/\\]$', '', '')
+ if $CI != '' && stridx(g:envstr, '/private/') == 0
+ let g:envstr = g:envstr[8:]
+ endif
+ call assert_equal(expect, g:envstr)
+ finally
+ call job_stop(job)
+ unlet g:envstr
+ endtry
endfunc
function Ch_test_close_lambda(port)
@@ -1731,7 +1735,7 @@ endfunc
func s:test_list_args(cmd, out, remove_lf)
try
let g:out = ''
- call job_start([s:python, '-c', a:cmd], {'callback': {ch, msg -> execute('let g:out .= msg')}, 'out_mode': 'raw'})
+ let job = job_start([s:python, '-c', a:cmd], {'callback': {ch, msg -> execute('let g:out .= msg')}, 'out_mode': 'raw'})
call WaitFor('"" != g:out')
if has('win32')
let g:out = substitute(g:out, '\r', '', 'g')
@@ -1741,6 +1745,7 @@ func s:test_list_args(cmd, out, remove_lf)
endif
call assert_equal(a:out, g:out)
finally
+ call job_stop(job)
unlet g:out
endtry
endfunc
diff --git a/src/version.c b/src/version.c
index e85058ede..3f1d7db31 100644
--- a/src/version.c
+++ b/src/version.c
@@ -772,6 +772,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1365,
+/**/
1364,
/**/
1363,