summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-01-17 22:13:54 +0100
committerBram Moolenaar <Bram@vim.org>2019-01-17 22:13:54 +0100
commit3020ccb113d397ddf474001dc00a1916ad7abdee (patch)
tree83f0bdea64f07c58732dbd8af69a14a62ef18696
parentae654385dfb2ae4c1d70789d1dce3676dba4dfbc (diff)
patch 8.1.0769: :stop is covered in two testsv8.1.0769
Problem: :stop is covered in two tests. Solution: Remove Test_stop_in_terminal(). Make other test exit Vim cleanly. (Ozaki Kiichi, closes #3814)
-rw-r--r--src/testdir/test_suspend.vim6
-rw-r--r--src/testdir/test_terminal.vim33
-rw-r--r--src/version.c2
3 files changed, 7 insertions, 34 deletions
diff --git a/src/testdir/test_suspend.vim b/src/testdir/test_suspend.vim
index a9964b0400..e569e49055 100644
--- a/src/testdir/test_suspend.vim
+++ b/src/testdir/test_suspend.vim
@@ -45,7 +45,11 @@ func Test_suspend()
call term_sendkeys(buf, "fg\<CR>")
call WaitForAssert({-> assert_equal(' 1 foo', term_getline(buf, '.'))})
+ " Quit gracefully to dump coverage information.
+ call term_sendkeys(buf, ":qall!\<CR>")
+ call term_wait(buf)
+ call Stop_shell_in_terminal(buf)
+
exe buf . 'bwipe!'
call delete('Xfoo')
- set autowrite&
endfunc
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim
index 6cd26218ec..b2690aed0a 100644
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -1690,39 +1690,6 @@ func Test_terminal_does_not_truncate_last_newlines()
call delete('Xfile')
endfunc
-func Test_stop_in_terminal()
- " We can't expect this to work on all systems, just test on Linux for now.
- if !has('unix') || system('uname') !~ 'Linux'
- return
- endif
- term /bin/sh
- let bufnr = bufnr('')
- call WaitForAssert({-> assert_equal('running', term_getstatus(bufnr))})
- let lastrow = term_getsize(bufnr)[0]
-
- call term_sendkeys(bufnr, GetVimCommandClean() . "\r")
- call term_sendkeys(bufnr, ":echo 'ready'\r")
- call WaitForAssert({-> assert_match('ready', Get_terminal_text(bufnr, lastrow))})
-
- call term_sendkeys(bufnr, ":stop\r")
- " Not sure where "Stopped" shows up, need five lines for Arch.
- call WaitForAssert({-> assert_match('Stopped',
- \ Get_terminal_text(bufnr, 1) .
- \ Get_terminal_text(bufnr, 2) .
- \ Get_terminal_text(bufnr, 3) .
- \ Get_terminal_text(bufnr, 4) .
- \ Get_terminal_text(bufnr, 5))})
-
- call term_sendkeys(bufnr, "fg\r")
- call term_sendkeys(bufnr, ":echo 'back again'\r")
- call WaitForAssert({-> assert_match('back again', Get_terminal_text(bufnr, lastrow))})
-
- call term_sendkeys(bufnr, ":quit\r")
- call term_wait(bufnr)
- call Stop_shell_in_terminal(bufnr)
- exe bufnr . 'bwipe'
-endfunc
-
func Test_terminal_no_job()
let term = term_start('false', {'term_finish': 'close'})
call WaitForAssert({-> assert_equal(v:null, term_getjob(term)) })
diff --git a/src/version.c b/src/version.c
index c6fe19d0e2..b98c7e663b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -792,6 +792,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 769,
+/**/
768,
/**/
767,