diff src/testdir/test_channel.vim @ 13778:5f6c61a71c02 v8.0.1761

patch 8.0.1761: job in terminal window with no output channel is killed commit https://github.com/vim/vim/commit/4e9d443a25b451e3f2de62e9eeea439aa4c3f039 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Apr 24 20:54:07 2018 +0200 patch 8.0.1761: job in terminal window with no output channel is killed 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)
author Christian Brabandt <cb@256bit.org>
date Tue, 24 Apr 2018 21:00:07 +0200
parents f309afff6f25
children 415185e2c970
line wrap: on
line diff
--- 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