endfunc
func Test_terminal_basic()
+ au BufWinEnter * if &buftype == 'terminal' | let b:done = 'yes' | endif
let buf = Run_shell_in_terminal({})
+
if has("unix")
call assert_match('^/dev/', job_info(g:job).tty_out)
call assert_match('^/dev/', term_gettty(''))
call assert_match('^\\\\.\\pipe\\', term_gettty(''))
endif
call assert_equal('t', mode())
+ call assert_equal('yes', b:done)
call assert_match('%aR[^\n]*running]', execute('ls'))
call Stop_shell_in_terminal(buf)
close
call assert_equal("", bufname(buf))
+ au! BufWinEnter
unlet g:job
endfunc