Mercurial > vim
comparison src/testdir/test_channel.vim @ 8386:3b9a306724ec v7.4.1485
commit https://github.com/vim/vim/commit/014069a7ac51557e531eb3c8b94e36f2193f6c21
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Mar 3 22:51:40 2016 +0100
patch 7.4.1485
Problem: Job input from buffer is not implemented.
Solution: Implement it. Add "in-top" and "in-bot" options.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 03 Mar 2016 23:00:05 +0100 |
parents | 764dba33605c |
children | 8894d595b786 |
comparison
equal
deleted
inserted
replaced
8385:4ee533cc650f | 8386:3b9a306724ec |
---|---|
477 finally | 477 finally |
478 call job_stop(job) | 478 call job_stop(job) |
479 endtry | 479 endtry |
480 endfunc | 480 endfunc |
481 | 481 |
482 func Test_pipe_from_buffer() | |
483 if !has('job') | |
484 return | |
485 endif | |
486 call ch_logfile('channellog', 'w') | |
487 call ch_log('Test_pipe_from_buffer()') | |
488 | |
489 sp pipe-input | |
490 call setline(1, ['echo one', 'echo two', 'echo three']) | |
491 | |
492 let job = job_start(s:python . " test_channel_pipe.py", | |
493 \ {'in-io': 'buffer', 'in-name': 'pipe-input'}) | |
494 call assert_equal("run", job_status(job)) | |
495 try | |
496 let handle = job_getchannel(job) | |
497 call assert_equal('one', ch_read(handle)) | |
498 call assert_equal('two', ch_read(handle)) | |
499 call assert_equal('three', ch_read(handle)) | |
500 bwipe! | |
501 finally | |
502 call job_stop(job) | |
503 endtry | |
504 call ch_logfile('') | |
505 endfunc | |
506 | |
482 func Test_pipe_to_nameless_buffer() | 507 func Test_pipe_to_nameless_buffer() |
483 if !has('job') | 508 if !has('job') |
484 return | 509 return |
485 endif | 510 endif |
486 call ch_log('Test_pipe_to_nameless_buffer()') | 511 call ch_log('Test_pipe_to_nameless_buffer()') |