To: vim_dev@googlegroups.com Subject: Patch 8.2.3790 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3790 Problem: Test for term_gettitle() fails in some environments. Solution: Make the digits after "VIM" optional. (Kenta Sato, closes #9334) Files: src/testdir/test_terminal2.vim *** ../vim-8.2.3789/src/testdir/test_terminal2.vim 2021-10-16 13:00:10.940165406 +0100 --- src/testdir/test_terminal2.vim 2021-12-12 18:44:18.432341381 +0000 *************** *** 521,535 **** 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 call term_sendkeys(term, ":set titlestring=foo\r") call WaitForAssert({-> assert_equal('foo', term_gettitle(term)) }) --- 521,531 ---- endif let term = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', '-c', 'set title']) ! " 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)) }) *** ../vim-8.2.3789/src/version.c 2021-12-12 16:42:01.490803015 +0000 --- src/version.c 2021-12-12 18:47:40.968115863 +0000 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 3790, /**/ -- How To Keep A Healthy Level Of Insanity: 18. When leaving the zoo, start running towards the parking lot, yelling "run for your lives, they're loose!!" /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///