summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-08-12 14:32:32 +0200
committerBram Moolenaar <Bram@vim.org>2017-08-12 14:32:32 +0200
commit8cad930a259a05a95c7d0c527a5881d5f9a59057 (patch)
treeaf7a71218529720c763171e928b826a140e6d9c1 /src/testdir
parentb81bc77ae7e43b5aac43970aaa4aa70c619e5009 (diff)
downloadvim-8cad930a259a05a95c7d0c527a5881d5f9a59057.zip
patch 8.0.0912: cannot run a job in a hidden terminal
Problem: Cannot run a job in a hidden terminal. Solution: Add option "hidden" and ++hidden.
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_terminal.vim15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim
index 9012bec14..97c13efbc 100644
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -337,7 +337,6 @@ func Test_finish_close()
endif
exe 'terminal ++close ' . cmd
- let buf = bufnr('')
call assert_equal(2, winnr('$'))
wincmd p
call WaitFor("winnr('$') == 1", waittime)
@@ -345,24 +344,32 @@ func Test_finish_close()
call term_start(cmd, {'term_finish': 'close'})
call assert_equal(2, winnr('$'))
- let buf = bufnr('')
wincmd p
call WaitFor("winnr('$') == 1", waittime)
call assert_equal(1, winnr('$'))
exe 'terminal ++open ' . cmd
- let buf = bufnr('')
close
call WaitFor("winnr('$') == 2", waittime)
call assert_equal(2, winnr('$'))
bwipe
call term_start(cmd, {'term_finish': 'open'})
- let buf = bufnr('')
close
call WaitFor("winnr('$') == 2", waittime)
call assert_equal(2, winnr('$'))
+ bwipe
+ exe 'terminal ++hidden ++open ' . cmd
+ call assert_equal(1, winnr('$'))
+ call WaitFor("winnr('$') == 2", waittime)
+ call assert_equal(2, winnr('$'))
+ bwipe
+
+ call term_start(cmd, {'term_finish': 'open', 'hidden': 1})
+ call assert_equal(1, winnr('$'))
+ call WaitFor("winnr('$') == 2", waittime)
+ call assert_equal(2, winnr('$'))
bwipe
endfunc