diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-07 23:07:07 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-07 23:07:07 +0200 |
commit | 8c5a278fc508da6dfe50e69b6ee734451aa4eafb (patch) | |
tree | 8a07c54e9ea8667a88f4aa2566e3c3c314727751 /src/testdir/test_channel.vim | |
parent | b59e7357722d977830948572a395f0a175c7ded8 (diff) | |
download | vim-git-8c5a278fc508da6dfe50e69b6ee734451aa4eafb.tar.gz |
patch 8.1.1826: tests use hand coded feature and option checksv8.1.1826
Problem: Tests use hand coded feature and option checks.
Solution: Use the commands from check.vim in more tests.
Diffstat (limited to 'src/testdir/test_channel.vim')
-rw-r--r-- | src/testdir/test_channel.vim | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim index 5a4234cec..dd19894e2 100644 --- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -855,9 +855,8 @@ func Test_pipe_from_buffer_nr() endfunc func Run_pipe_through_sort(all, use_buffer) - if !executable('sort') - throw 'Skipped: sort program not found' - endif + CheckExecutable sort + let options = {'out_io': 'buffer', 'out_name': 'sortout'} if a:use_buffer split sortin @@ -1014,9 +1013,8 @@ func Test_pipe_io_one_buffer() endfunc func Test_write_to_buffer_and_scroll() - if !CanRunVimInTerminal() - throw 'Skipped: cannot make screendumps' - endif + CheckScreendump + let lines =<< trim END new Xscrollbuffer call setline(1, range(1, 200)) @@ -1536,9 +1534,8 @@ func Test_using_freed_memory() endfunc func Test_collapse_buffers() - if !executable('cat') - throw 'Skipped: cat program not found' - endif + CheckExecutable cat + sp test_channel.vim let g:linecount = line('$') close @@ -1550,9 +1547,8 @@ func Test_collapse_buffers() endfunc func Test_write_to_deleted_buffer() - if !executable('echo') - throw 'Skipped: echo program not found' - endif + CheckExecutable echo + let job = job_start('echo hello', {'out_io': 'buffer', 'out_name': 'test_buffer', 'out_msg': 0}) let bufnr = bufnr('test_buffer') call WaitForAssert({-> assert_equal(['hello'], getbufline(bufnr, 1, '$'))}) @@ -1585,9 +1581,7 @@ func Test_cmd_parsing() endfunc func Test_raw_passes_nul() - if !executable('cat') - throw 'Skipped: cat program not found' - endif + CheckExecutable cat " Test lines from the job containing NUL are stored correctly in a buffer. new |