comparison src/testdir/test_terminal.vim @ 18450:507348b211b4 v8.1.2219

patch 8.1.2219: no autocommand for open window with terminal Commit: https://github.com/vim/vim/commit/28ed4dfe1f80905fb399c2cde31ace5ee14d8c67 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 26 16:21:40 2019 +0200 patch 8.1.2219: no autocommand for open window with terminal Problem: No autocommand for open window with terminal. Solution: Add TerminalWinOpen. (Christian Brabandt)
author Bram Moolenaar <Bram@vim.org>
date Sat, 26 Oct 2019 16:30:03 +0200
parents 527b7084c556
children 0eeaa9a6e4e7
comparison
equal deleted inserted replaced
18449:2d1716e5ba53 18450:507348b211b4
64 close 64 close
65 call assert_equal("", bufname(buf)) 65 call assert_equal("", bufname(buf))
66 66
67 au! TerminalOpen 67 au! TerminalOpen
68 unlet g:job 68 unlet g:job
69 endfunc
70
71 func Test_terminal_TerminalWinOpen()
72 au TerminalWinOpen * let b:done = 'yes'
73 let buf = Run_shell_in_terminal({})
74 call assert_equal('yes', b:done)
75 call StopShellInTerminal(buf)
76 " closing window wipes out the terminal buffer with the finished job
77 close
78
79 if has("unix")
80 terminal ++hidden ++open sleep 1
81 sleep 1
82 call assert_fails("echo b:done", 'E121:')
83 endif
84
85 au! TerminalWinOpen
69 endfunc 86 endfunc
70 87
71 func Test_terminal_make_change() 88 func Test_terminal_make_change()
72 let buf = Run_shell_in_terminal({}) 89 let buf = Run_shell_in_terminal({})
73 call StopShellInTerminal(buf) 90 call StopShellInTerminal(buf)