diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-12 18:50:19 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-12 18:50:19 +0000 |
commit | 3bb79dc191a1dec14606b1b94b968a6808906700 (patch) | |
tree | 62d295a7554dc76e4a3923803877616fd33a50e3 /src | |
parent | fa9a8e0fd1143d2b47611c6cc13e32f6283448a4 (diff) | |
download | vim-git-3bb79dc191a1dec14606b1b94b968a6808906700.tar.gz |
patch 8.2.3790: test for term_gettitle() fails in some environmentsv8.2.3790
Problem: Test for term_gettitle() fails in some environments.
Solution: Make the digits after "VIM" optional. (Kenta Sato, closes #9334)
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/test_terminal2.vim | 14 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/testdir/test_terminal2.vim b/src/testdir/test_terminal2.vim index 68f9ad868..088f697ec 100644 --- a/src/testdir/test_terminal2.vim +++ b/src/testdir/test_terminal2.vim @@ -521,15 +521,11 @@ func Test_term_gettitle() endif let term = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', '-c', 'set title']) - if has('autoservername') - call WaitForAssert({-> assert_match('^\[No Name\] - VIM\d\+$', term_gettitle(term)) }) - call term_sendkeys(term, ":e Xfoo\r") - call WaitForAssert({-> assert_match('^Xfoo (.*[/\\]testdir) - VIM\d\+$', term_gettitle(term)) }) - else - call WaitForAssert({-> assert_equal('[No Name] - VIM', term_gettitle(term)) }) - call term_sendkeys(term, ":e Xfoo\r") - call WaitForAssert({-> assert_match('^Xfoo (.*[/\\]testdir) - VIM$', term_gettitle(term)) }) - endif + " When Vim is running as a server then the title ends in VIM{number}, thus + " optionally match a number after "VIM". + call WaitForAssert({-> assert_match('^\[No Name\] - VIM\d*$', term_gettitle(term)) }) + call term_sendkeys(term, ":e Xfoo\r") + call WaitForAssert({-> assert_match('^Xfoo (.*[/\\]testdir) - VIM\d*$', term_gettitle(term)) }) call term_sendkeys(term, ":set titlestring=foo\r") call WaitForAssert({-> assert_equal('foo', term_gettitle(term)) }) diff --git a/src/version.c b/src/version.c index ac574d530..ec9ac322b 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3790, +/**/ 3789, /**/ 3788, |