]> granicus.if.org Git - vim/commitdiff
patch 8.1.1166: gettitle test can still fail when another Vim is running v8.1.1166
authorBram Moolenaar <Bram@vim.org>
Sat, 13 Apr 2019 18:39:15 +0000 (20:39 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 13 Apr 2019 18:39:15 +0000 (20:39 +0200)
Problem:    Gettitle test can still fail when another Vim is running.
Solution:   Accept any server name number. (Dominique Pelle, closes #4252)

src/testdir/test_terminal.vim
src/version.c

index 41a048a5b04f7d89deed8e2247e803b864b1a234..f81bcd32125af82f435d7342715fc45eea7cedeb 100644 (file)
@@ -1904,14 +1904,15 @@ func Test_term_gettitle()
 
   let term = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'])
   if has('autoservername')
-    call WaitForAssert({-> assert_equal('[No Name] - VIM1', term_gettitle(term)) })
+    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
 
-  call term_sendkeys(term, ":e Xfoo\r")
-  call WaitForAssert({-> assert_match('Xfoo (.*[/\\]testdir) - VIM', term_gettitle(term)) })
-
   call term_sendkeys(term, ":set titlestring=foo\r")
   call WaitForAssert({-> assert_equal('foo', term_gettitle(term)) })
 
index 881c67aa0d490c5378b8029a00154123d8501b71..cd7bb3f568119dcfd73eacff9eafca17cc7ddc56 100644 (file)
@@ -771,6 +771,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1166,
 /**/
     1165,
 /**/