]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0915: tests: two terminal tests in test_popupwin fail on FreeBSD v9.2.0915
authorHirohito Higashi <h.east.727@gmail.com>
Wed, 5 Aug 2026 19:29:01 +0000 (19:29 +0000)
committerChristian Brabandt <cb@256bit.org>
Wed, 5 Aug 2026 19:29:01 +0000 (19:29 +0000)
Problem:  Two terminal tests in test_popupwin fail on FreeBSD, where the
          shell echoes the typed character more than once (neil).
Solution: Only assert the start of the terminal line.

fixes:  #20955
closes: #20957

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/test_popupwin.vim
src/version.c

index 68267310905c55d2887727fc4c5078c7b14041c8..61af5e050af4de873681bec8386286629d2a4274 100644 (file)
@@ -3076,11 +3076,12 @@ func Test_popupwin_terminal_buffer()
   call WaitForAssert({-> assert_equal("run", job_status(term_getjob(termbuf)))})
   call WaitForAssert({-> assert_equal('', term_getline(termbuf, '.'))})
 
-  " When typing a character, the cursor is after it.
+  " When typing a character, the cursor is after it.  Some shells echo it
+  " more than once.
   call feedkeys("x", 'xt')
   call term_wait(termbuf)
   redraw
-  call WaitForAssert({-> assert_equal('x', term_getline(termbuf, '.'))})
+  call WaitForAssert({-> assert_match('^x', term_getline(termbuf, '.'))})
   call feedkeys("\<BS>", 'xt')
 
   " Check this doesn't crash
@@ -5480,10 +5481,11 @@ func Test_popup_opacity_terminal_no_freeze()
 
   " Before the fix typing froze Vim: redraw under an opacity popup raised
   " must_redraw every cycle, trapping terminal_loop in its redraw loop.
+  " Some shells echo the character more than once.
   call feedkeys('x', 'xt')
   call term_wait(termbuf)
   redraw
-  call WaitForAssert({-> assert_equal('x', term_getline(termbuf, '.'))})
+  call WaitForAssert({-> assert_match('^x', term_getline(termbuf, '.'))})
 
   call feedkeys("\<BS>", 'xt')
   call feedkeys("exit\<CR>", 'xt')
index 1931bc906f614235e31f576ce75b1279327894b6..cca2e3afa7cdc1250261186672f8e6a54ee20e26 100644 (file)
@@ -763,6 +763,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    915,
 /**/
     914,
 /**/