comparison src/testdir/test_channel.vim @ 25969:a5a772dace5b v8.2.3518

patch 8.2.3518: Test_xrestore sometimes fails Commit: https://github.com/vim/vim/commit/f08b0eb8691ff09f98bc4beef986ece1c521655f Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 16 13:00:14 2021 +0100 patch 8.2.3518: Test_xrestore sometimes fails Problem: Test_xrestore sometimes fails. Solution: Mark the test as flayky. Move marking test as flaky to the test instead of listing them in runtest.
author Bram Moolenaar <Bram@vim.org>
date Sat, 16 Oct 2021 14:15:04 +0200
parents 58b1c9d96ec6
children 95a267994eac
comparison
equal deleted inserted replaced
25968:c506b33fff84 25969:a5a772dace5b
793 func Test_pipe_to_buffer_name_nomsg() 793 func Test_pipe_to_buffer_name_nomsg()
794 call Run_test_pipe_to_buffer(1, 0, 1) 794 call Run_test_pipe_to_buffer(1, 0, 1)
795 endfunc 795 endfunc
796 796
797 func Test_close_output_buffer() 797 func Test_close_output_buffer()
798 let g:test_is_flaky = 1
798 enew! 799 enew!
799 let test_lines = ['one', 'two'] 800 let test_lines = ['one', 'two']
800 call setline(1, test_lines) 801 call setline(1, test_lines)
801 let options = {'out_io': 'buffer'} 802 let options = {'out_io': 'buffer'}
802 let options['out_name'] = 'buffer-output' 803 let options['out_name'] = 'buffer-output'
933 call Run_test_pipe_from_buffer(0) 934 call Run_test_pipe_from_buffer(0)
934 endfunc 935 endfunc
935 936
936 func Run_pipe_through_sort(all, use_buffer) 937 func Run_pipe_through_sort(all, use_buffer)
937 CheckExecutable sort 938 CheckExecutable sort
939 let g:test_is_flaky = 1
938 940
939 let options = {'out_io': 'buffer', 'out_name': 'sortout'} 941 let options = {'out_io': 'buffer', 'out_name': 'sortout'}
940 if a:use_buffer 942 if a:use_buffer
941 split sortin 943 split sortin
942 call setline(1, ['ccc', 'aaa', 'ddd', 'bbb', 'eee']) 944 call setline(1, ['ccc', 'aaa', 'ddd', 'bbb', 'eee'])
1204 call job_stop(job) 1206 call job_stop(job)
1205 endtry 1207 endtry
1206 endfunc 1208 endfunc
1207 1209
1208 func Test_out_cb() 1210 func Test_out_cb()
1211 let g:test_is_flaky = 1
1209 let dict = {'thisis': 'dict: '} 1212 let dict = {'thisis': 'dict: '}
1210 func dict.outHandler(chan, msg) dict 1213 func dict.outHandler(chan, msg) dict
1211 if type(a:msg) == v:t_string 1214 if type(a:msg) == v:t_string
1212 let g:Ch_outmsg = self.thisis . a:msg 1215 let g:Ch_outmsg = self.thisis . a:msg
1213 else 1216 else
1331 call job_stop(job) 1334 call job_stop(job)
1332 endtry 1335 endtry
1333 endfunc 1336 endfunc
1334 1337
1335 func Test_close_and_exit_cb() 1338 func Test_close_and_exit_cb()
1339 let g:test_is_flaky = 1
1336 let g:retdict = {'ret': {}} 1340 let g:retdict = {'ret': {}}
1337 func g:retdict.close_cb(ch) dict 1341 func g:retdict.close_cb(ch) dict
1338 let self.ret['close_cb'] = a:ch->ch_getjob()->job_status() 1342 let self.ret['close_cb'] = a:ch->ch_getjob()->job_status()
1339 endfunc 1343 endfunc
1340 func g:retdict.exit_cb(job, status) dict 1344 func g:retdict.exit_cb(job, status) dict
1558 call Resume() 1562 call Resume()
1559 endfunction 1563 endfunction
1560 1564
1561 func Test_exit_callback_interval() 1565 func Test_exit_callback_interval()
1562 CheckFunction reltimefloat 1566 CheckFunction reltimefloat
1567 let g:test_is_flaky = 1
1563 1568
1564 let g:exit_cb_val = {'start': reltime(), 'end': 0, 'process': 0} 1569 let g:exit_cb_val = {'start': reltime(), 'end': 0, 'process': 0}
1565 let job = [s:python, '-c', 'import time;time.sleep(0.5)']->job_start({'exit_cb': 'MyExitTimeCb'}) 1570 let job = [s:python, '-c', 'import time;time.sleep(0.5)']->job_start({'exit_cb': 'MyExitTimeCb'})
1566 let g:exit_cb_val.process = job_info(job).process 1571 let g:exit_cb_val.process = job_info(job).process
1567 call WaitFor('type(g:exit_cb_val.end) != v:t_number || g:exit_cb_val.end != 0') 1572 call WaitFor('type(g:exit_cb_val.end) != v:t_number || g:exit_cb_val.end != 0')
1740 sleep 10m 1745 sleep 10m
1741 call test_garbagecollect_now() 1746 call test_garbagecollect_now()
1742 endfunc 1747 endfunc
1743 1748
1744 func Test_collapse_buffers() 1749 func Test_collapse_buffers()
1750 let g:test_is_flaky = 1
1745 CheckExecutable cat 1751 CheckExecutable cat
1746 1752
1747 sp test_channel.vim 1753 sp test_channel.vim
1748 let g:linecount = line('$') 1754 let g:linecount = line('$')
1749 close 1755 close
1882 call WaitForAssert({-> assert_equal("bar", g:envstr)}) 1888 call WaitForAssert({-> assert_equal("bar", g:envstr)})
1883 unlet g:envstr 1889 unlet g:envstr
1884 endfunc 1890 endfunc
1885 1891
1886 func Test_cwd() 1892 func Test_cwd()
1893 let g:test_is_flaky = 1
1887 let g:envstr = '' 1894 let g:envstr = ''
1888 if has('win32') 1895 if has('win32')
1889 let expect = $TEMP 1896 let expect = $TEMP
1890 let cmd = ['cmd', '/c', 'echo %CD%'] 1897 let cmd = ['cmd', '/c', 'echo %CD%']
1891 else 1898 else