patch 9.2.0426: tests: still some flaky screendump tests

Commit: 
https://github.com/vim/vim/commit/cf5d7102b9624f1bf230b6efad22f9bd0b39bd53
Author: Yasuhiro Matsumoto <[email protected]>
Date:   Fri May 1 16:01:03 2026 +0000

    patch 9.2.0426: tests: still some flaky screendump tests
    
    Problem:  tests: still some flaky screendump tests
              (James McCoy)
    Solution: Replace flaky VerifyScreenDump checks with assert_* assertions
              for Test_visual_block_scroll and Test_scrolloffpad_with_folds,
              and remove the now-unused dump files, mark those tests as
              flaky (which happened previously for screendump tests
              automatically) (Yasuhiro Matsumoto).
    
    fixes:   #20096
    related: #20095
    
    Signed-off-by: Yasuhiro Matsumoto <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/testdir/dumps/Test_display_visual_block_scroll.dump 
b/src/testdir/dumps/Test_display_visual_block_scroll.dump
deleted file mode 100644
index 36eae0c02..000000000
--- a/src/testdir/dumps/Test_display_visual_block_scroll.dump
+++ /dev/null
@@ -1,7 +0,0 @@
-|{+0#0000001#a8a8a8255| | +0#0000000#ffffff0@72
-|}+0#0000001#a8a8a8255| | +0#0000000#ffffff0@72
-|{+0#0000001#a8a8a8255| | +0#0000000#ffffff0@72
-|f+0#0000001#a8a8a8255| | +0#0000000#ffffff0@72
->g| +0#0000001#a8a8a8255| +0#0000000#ffffff0@72
-|}| @73
-|-+2&&@1| |V|I|S|U|A|L| |L|I|N|E| |-@1| +0&&@29|7| @8|1@1|,|1| @9|B|o|t| 
diff --git a/src/testdir/dumps/Test_scrolloffpad_folds_1.dump 
b/src/testdir/dumps/Test_scrolloffpad_folds_1.dump
deleted file mode 100644
index 1c6433300..000000000
--- a/src/testdir/dumps/Test_scrolloffpad_folds_1.dump
+++ /dev/null
@@ -1,20 +0,0 @@
-|l+0&#ffffff0|i|n|e| |1@2| @69
-|l|i|n|e| |1@1|2| @69
-|l|i|n|e| |1@1|3| @69
-|l|i|n|e| |1@1|4| @69
-|l|i|n|e| |1@1|5| @69
-|l|i|n|e| |1@1|6| @69
-|l|i|n|e| |1@1|7| @69
-|l|i|n|e| |1@1|8| @69
-|l|i|n|e| |1@1|9| @69
->l|i|n|e| |1|2|0| @69
-|~+0#4040ff13&| @76
-|~| @76
-|~| @76
-|~| @76
-|~| @76
-|~| @76
-|~| @76
-|~| @76
-|~| @76
-| +0#0000000&@59|1|2|0|,|1| @8|B|o|t| 
diff --git a/src/testdir/dumps/Test_scrolloffpad_folds_2.dump 
b/src/testdir/dumps/Test_scrolloffpad_folds_2.dump
deleted file mode 100644
index 63ac801b4..000000000
--- a/src/testdir/dumps/Test_scrolloffpad_folds_2.dump
+++ /dev/null
@@ -1,20 +0,0 @@
-|l+0&#ffffff0|i|n|e| |5|1| @70
-|l|i|n|e| |5|2| @70
-|l|i|n|e| |5|3| @70
-|l|i|n|e| |5|4| @70
-|l|i|n|e| |5@1| @70
-|l|i|n|e| |5|6| @70
-|l|i|n|e| |5|7| @70
-|l|i|n|e| |5|8| @70
-|l|i|n|e| |5|9| @70
->++0#0000e05#a8a8a8255|-@1| |5|1| |l|i|n|e|s|:| |l|i|n|e| |6|0|-@56
-|l+0#0000000#ffffff0|i|n|e| |1@2| @69
-|l|i|n|e| |1@1|2| @69
-|l|i|n|e| |1@1|3| @69
-|l|i|n|e| |1@1|4| @69
-|l|i|n|e| |1@1|5| @69
-|l|i|n|e| |1@1|6| @69
-|l|i|n|e| |1@1|7| @69
-|l|i|n|e| |1@1|8| @69
-|l|i|n|e| |1@1|9| @69
-@60|6|0|,|1| @9|9|8|%| 
diff --git a/src/testdir/dumps/Test_scrolloffpad_folds_3.dump 
b/src/testdir/dumps/Test_scrolloffpad_folds_3.dump
deleted file mode 100644
index 1c6433300..000000000
--- a/src/testdir/dumps/Test_scrolloffpad_folds_3.dump
+++ /dev/null
@@ -1,20 +0,0 @@
-|l+0&#ffffff0|i|n|e| |1@2| @69
-|l|i|n|e| |1@1|2| @69
-|l|i|n|e| |1@1|3| @69
-|l|i|n|e| |1@1|4| @69
-|l|i|n|e| |1@1|5| @69
-|l|i|n|e| |1@1|6| @69
-|l|i|n|e| |1@1|7| @69
-|l|i|n|e| |1@1|8| @69
-|l|i|n|e| |1@1|9| @69
->l|i|n|e| |1|2|0| @69
-|~+0#4040ff13&| @76
-|~| @76
-|~| @76
-|~| @76
-|~| @76
-|~| @76
-|~| @76
-|~| @76
-|~| @76
-| +0#0000000&@59|1|2|0|,|1| @8|B|o|t| 
diff --git a/src/testdir/test_plugin_matchparen.vim 
b/src/testdir/test_plugin_matchparen.vim
index cc6513bb6..136d55a31 100644
--- a/src/testdir/test_plugin_matchparen.vim
+++ b/src/testdir/test_plugin_matchparen.vim
@@ -8,8 +8,8 @@ source util/screendump.vim
 
 " Test for scrolling that modifies buffer during visual block
 func Test_visual_block_scroll()
-  CheckScreendump
-
+  CheckRunVimInTerminal
+  let g:test_is_flaky = 1
   let lines =<< trim END
     source $VIMRUNTIME/plugin/matchparen.vim
     set scrolloff=1
@@ -23,8 +23,13 @@ func Test_visual_block_scroll()
   let buf = RunVimInTerminal('-S '.filename, #{rows: 7})
   call term_sendkeys(buf, "V\<C-D>\<C-D>")
 
-  call WaitForAssert({-> assert_match('VISUAL.*\d\+\s\+\d', term_getline(buf, 
7))}, 1000)
-  call VerifyScreenDump(buf, 'Test_display_visual_block_scroll', {})
+  call WaitForAssert({-> assert_equal('{', trim(term_getline(buf, 1)))}, 1000)
+  call assert_equal('}', trim(term_getline(buf, 2)))
+  call assert_equal('{', trim(term_getline(buf, 3)))
+  call assert_equal('f', trim(term_getline(buf, 4)))
+  call assert_equal('g', trim(term_getline(buf, 5)))
+  call assert_equal('}', trim(term_getline(buf, 6)))
+  call assert_match('VISUAL LINE .*1,1\s\+Bot', term_getline(buf, 7))
 
   call StopVimInTerminal(buf)
 endfunc
diff --git a/src/testdir/test_scroll_opt.vim b/src/testdir/test_scroll_opt.vim
index 4d0e44c2e..7ee9fa2d2 100644
--- a/src/testdir/test_scroll_opt.vim
+++ b/src/testdir/test_scroll_opt.vim
@@ -2038,9 +2038,9 @@ func Test_scrolloffpad_diff_eof_filler_behavior()
 endfunc
 
 func Test_scrolloffpad_with_folds()
-  CheckScreendump
   CheckRunVimInTerminal
   CheckFeature folding
+  let g:test_is_flaky = 1
 
   let save_termwinsize = &termwinsize
   set termwinsize=
@@ -2065,27 +2065,40 @@ func Test_scrolloffpad_with_folds()
 
   let buf = RunVimInTerminal('-S XScrolloffpadFolds', #{rows: 20, cols: 78})
 
-  " Case 1: Jump to end-of-file
-  " With folds present, scrolloffpad should still
-  " keep the cursor positioned with padding below EOF
+  " Case 1: Jump to end-of-file.
+  " With folds present, scrolloffpad should still keep the cursor positioned
+  " with padding below EOF.
   call term_sendkeys(buf, "\<Esc>:\<C-U>normal! G\<CR>")
   call term_sendkeys(buf, "\<C-L>")
-  call TermWait(buf)
-  call VerifyScreenDump(buf, 'Test_scrolloffpad_folds_1', {})
-
-  " Case 2: Move to the folded line to ensure the fold is actually in view
+  call WaitForAssert({-> assert_equal('line 120', trim(term_getline(buf, 
10)))},
+        \ 1000)
+  call assert_equal('line 111', trim(term_getline(buf, 1)))
+  call assert_equal('line 119', trim(term_getline(buf, 9)))
+  call assert_equal('~', trim(term_getline(buf, 11)))
+  call assert_match('120,1\s\+Bot', term_getline(buf, 20))
+
+  " Case 2: Move to the folded line to ensure the fold is actually in view.
   call term_sendkeys(buf, "\<Esc>:\<C-U>normal! 60G\<CR>")
   call term_sendkeys(buf, "\<C-L>")
-  call TermWait(buf)
-  call VerifyScreenDump(buf, 'Test_scrolloffpad_folds_2', {})
-
-  " Case 3: Close the fold explicitly and go to EOF again
-  " Behavior should remain stable with closed folds
+  call WaitForAssert({-> assert_match('^\s*+-- 51 lines: line 60--',
+        \ term_getline(buf, 10))}, 1000)
+  call assert_equal('line 51', trim(term_getline(buf, 1)))
+  call assert_equal('line 59', trim(term_getline(buf, 9)))
+  call assert_equal('line 111', trim(term_getline(buf, 11)))
+  call assert_equal('line 119', trim(term_getline(buf, 19)))
+  call assert_match('60,1\s\+98%', term_getline(buf, 20))
+
+  " Case 3: Close the fold explicitly and go to EOF again.
+  " Behavior should remain stable with closed folds.
   call term_sendkeys(buf, "\<Esc>:\<C-U>normal! zc\<CR>")
   call term_sendkeys(buf, "\<Esc>:\<C-U>normal! G\<CR>")
   call term_sendkeys(buf, "\<C-L>")
-  call TermWait(buf)
-  call VerifyScreenDump(buf, 'Test_scrolloffpad_folds_3', {})
+  call WaitForAssert({-> assert_equal('line 120', trim(term_getline(buf, 
10)))},
+        \ 1000)
+  call assert_equal('line 111', trim(term_getline(buf, 1)))
+  call assert_equal('line 119', trim(term_getline(buf, 9)))
+  call assert_equal('~', trim(term_getline(buf, 11)))
+  call assert_match('120,1\s\+Bot', term_getline(buf, 20))
 
   call StopVimInTerminal(buf)
   let &termwinsize = save_termwinsize
diff --git a/src/version.c b/src/version.c
index 410866579..d79705029 100644
--- a/src/version.c
+++ b/src/version.c
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    426,
 /**/
     425,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1wIqke-000fWx-Ez%40256bit.org.

Raspunde prin e-mail lui