diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-04-24 20:54:07 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-04-24 20:54:07 +0200 |
commit | 4e9d443a25b451e3f2de62e9eeea439aa4c3f039 (patch) | |
tree | f10f5ab6ad66c232e7679acf86863494559a390f /src/testdir/test_channel.vim | |
parent | 4994373c5db80f8fd57e802997ae430afa5ec9ec (diff) |
patch 8.0.1761: job in terminal window with no output channel is killedv8.0.1761
Problem: Job in terminal window with no output channel is killed.
Solution: Keep the job running when the input is a tty. (Ozaki Kiichi,
closes #2734)
Diffstat (limited to 'src/testdir/test_channel.vim')
-rw-r--r-- | src/testdir/test_channel.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim index 805fa8dcac..ec8111e583 100644 --- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -1848,3 +1848,14 @@ func Test_zz_ch_log() call assert_match("%s%s", text[2]) call delete('Xlog') endfunc + +func Test_keep_pty_open() + if !has('unix') + return + endif + + let job = job_start(s:python . ' -c "import time;time.sleep(0.2)"', {'out_io': 'null', 'err_io': 'null', 'pty': 1}) + let elapsed = WaitFor({-> job_status(job) ==# 'dead'}) + call assert_inrange(200, 1000, elapsed) + call job_stop(job) +endfunc |