Mercurial > vim
comparison src/testdir/test_channel.vim @ 8471:c1aae3a79279 v7.4.1526
commit https://github.com/vim/vim/commit/d5d3d307ddb824f59a2f2516c4b6a6d48762aa58
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 9 20:54:51 2016 +0100
patch 7.4.1526
Problem: Writing to file and not connecting a channel doesn't work for
MS-Windows.
Solution: Make it work. (Yasuhiro Matsumoto)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 09 Mar 2016 21:00:05 +0100 |
parents | 5927180d0b4d |
children | c08c6d19db4d |
comparison
equal
deleted
inserted
replaced
8470:552c13b08d0b | 8471:c1aae3a79279 |
---|---|
548 | 548 |
549 func Test_nl_write_out_file() | 549 func Test_nl_write_out_file() |
550 if !has('job') | 550 if !has('job') |
551 return | 551 return |
552 endif | 552 endif |
553 " TODO: make this work for MS-Windows | |
554 if !has('unix') | |
555 return | |
556 endif | |
557 call ch_log('Test_nl_write_out_file()') | 553 call ch_log('Test_nl_write_out_file()') |
558 let job = job_start(s:python . " test_channel_pipe.py", | 554 let job = job_start(s:python . " test_channel_pipe.py", |
559 \ {'out-io': 'file', 'out-name': 'Xoutput'}) | 555 \ {'out-io': 'file', 'out-name': 'Xoutput'}) |
560 call assert_equal("run", job_status(job)) | 556 call assert_equal("run", job_status(job)) |
561 try | 557 try |
573 | 569 |
574 func Test_nl_write_err_file() | 570 func Test_nl_write_err_file() |
575 if !has('job') | 571 if !has('job') |
576 return | 572 return |
577 endif | 573 endif |
578 " TODO: make this work for MS-Windows | |
579 if !has('unix') | |
580 return | |
581 endif | |
582 call ch_log('Test_nl_write_err_file()') | 574 call ch_log('Test_nl_write_err_file()') |
583 let job = job_start(s:python . " test_channel_pipe.py", | 575 let job = job_start(s:python . " test_channel_pipe.py", |
584 \ {'err-io': 'file', 'err-name': 'Xoutput'}) | 576 \ {'err-io': 'file', 'err-name': 'Xoutput'}) |
585 call assert_equal("run", job_status(job)) | 577 call assert_equal("run", job_status(job)) |
586 try | 578 try |
596 endtry | 588 endtry |
597 endfunc | 589 endfunc |
598 | 590 |
599 func Test_nl_write_both_file() | 591 func Test_nl_write_both_file() |
600 if !has('job') | 592 if !has('job') |
601 return | |
602 endif | |
603 " TODO: make this work for MS-Windows | |
604 if !has('unix') | |
605 return | 593 return |
606 endif | 594 endif |
607 call ch_log('Test_nl_write_both_file()') | 595 call ch_log('Test_nl_write_both_file()') |
608 let job = job_start(s:python . " test_channel_pipe.py", | 596 let job = job_start(s:python . " test_channel_pipe.py", |
609 \ {'out-io': 'file', 'out-name': 'Xoutput', 'err-io': 'out'}) | 597 \ {'out-io': 'file', 'out-name': 'Xoutput', 'err-io': 'out'}) |
836 | 824 |
837 func Test_pipe_null() | 825 func Test_pipe_null() |
838 if !has('job') | 826 if !has('job') |
839 return | 827 return |
840 endif | 828 endif |
841 " TODO: implement this for MS-Windows | |
842 if !has('unix') | |
843 return | |
844 endif | |
845 call ch_log('Test_pipe_null()') | 829 call ch_log('Test_pipe_null()') |
846 | 830 |
847 " We cannot check that no I/O works, we only check that the job starts | 831 " We cannot check that no I/O works, we only check that the job starts |
848 " properly. | 832 " properly. |
849 let job = job_start(s:python . " test_channel_pipe.py something", | 833 let job = job_start(s:python . " test_channel_pipe.py something", |