diff src/testdir/test_terminal.vim @ 12112:6afc7339c2ad v8.0.0936

patch 8.0.0936: mode() returns wrong value for a terminal window commit https://github.com/vim/vim/commit/2bb7b6b0e477612cc098cba27cc63ec3d19a2527 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 13 20:58:33 2017 +0200 patch 8.0.0936: mode() returns wrong value for a terminal window Problem: Mode() returns wrong value for a terminal window. Solution: Return 't' when typed keys go to a job.
author Christian Brabandt <cb@256bit.org>
date Sun, 13 Aug 2017 21:00:04 +0200
parents d2c20ec4b95a
children bf53df1f17ba
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -42,8 +42,13 @@ func Test_terminal_basic()
     call assert_match("^winpty://", job_info(g:job).tty)
     call assert_match("^winpty://", term_gettty(''))
   endif
+  call assert_equal('t', mode())
+  call assert_match('%aR[^\n]*running]', execute('ls'))
+
   call Stop_shell_in_terminal(buf)
   call term_wait(buf)
+  call assert_equal('n', mode())
+  call assert_match('%aF[^\n]*finished]', execute('ls'))
 
   " closing window wipes out the terminal buffer a with finished job
   close