comparison src/testdir/test_channel.vim @ 22969:dcb59b1cc0c1 v8.2.2031

patch 8.2.2031: some tests fail when run under valgrind Commit: https://github.com/vim/vim/commit/18dc355395f2eac72ab83d984cacd26ae61c791f Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 22 14:24:00 2020 +0100 patch 8.2.2031: some tests fail when run under valgrind Problem: Some tests fail when run under valgrind. Solution: Avoid timing problems.
author Bram Moolenaar <Bram@vim.org>
date Sun, 22 Nov 2020 14:30:06 +0100
parents ff21e2962490
children 515d1651c6c6
comparison
equal deleted inserted replaced
22968:5ae81cb3da0a 22969:dcb59b1cc0c1
2179 if has('win32') 2179 if has('win32')
2180 let cmd = 'cmd /c pause' 2180 let cmd = 'cmd /c pause'
2181 else 2181 else
2182 let cmd = 'grep foo' 2182 let cmd = 'grep foo'
2183 endif 2183 endif
2184
2184 let g:job = job_start(cmd, {}) 2185 let g:job = job_start(cmd, {})
2186 sleep 50m " give the job time to start
2185 call job_stop(g:job) 2187 call job_stop(g:job)
2188 call WaitForAssert({-> assert_equal(-1, job_info(g:job).exitval)})
2189
2190 let g:job = job_start(cmd, {})
2186 sleep 50m 2191 sleep 50m
2187 call assert_equal(-1, job_info(g:job).exitval) 2192 call job_stop(g:job, 'term')
2193 call WaitForAssert({-> assert_equal(-1, job_info(g:job).exitval)})
2194
2188 let g:job = job_start(cmd, {}) 2195 let g:job = job_start(cmd, {})
2189 call job_stop(g:job, 'term')
2190 sleep 50m 2196 sleep 50m
2191 call assert_equal(-1, job_info(g:job).exitval)
2192 let g:job = job_start(cmd, {})
2193 call job_stop(g:job, 'kill') 2197 call job_stop(g:job, 'kill')
2194 sleep 50m 2198 call WaitForAssert({-> assert_equal(-1, job_info(g:job).exitval)})
2195 call assert_equal(-1, job_info(g:job).exitval)
2196 endfunc 2199 endfunc
2197 2200
2198 func Test_issue_5485() 2201 func Test_issue_5485()
2199 let $VAR1 = 'global' 2202 let $VAR1 = 'global'
2200 let g:Ch_reply = "" 2203 let g:Ch_reply = ""