]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0429: tests: flaky screendump Test_smoothscroll_incsearch() v9.2.0429
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Sat, 2 May 2026 13:29:01 +0000 (13:29 +0000)
committerChristian Brabandt <cb@256bit.org>
Sat, 2 May 2026 13:29:01 +0000 (13:29 +0000)
Problem:  tests: flaky screendump Test_smoothscroll_incsearch()
Solution: Replace screendump test by WaitForAssert()
          (Yasuhiro Matsumoto)

VerifyScreenDump fails consistently on the macos-15-intel CI runner.
Replace the dump comparisons with assertions that verify the actual
invariant under test: that the visible buffer view stays unchanged
across the four incremental-search keystrokes (i.e. skipcol is not
reset). Drop the now-unused dump files.

closes: #20118

Signed-off-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/dumps/Test_smooth_incsearch_1.dump [deleted file]
src/testdir/dumps/Test_smooth_incsearch_2.dump [deleted file]
src/testdir/dumps/Test_smooth_incsearch_3.dump [deleted file]
src/testdir/dumps/Test_smooth_incsearch_4.dump [deleted file]
src/testdir/test_scroll_opt.vim
src/version.c

diff --git a/src/testdir/dumps/Test_smooth_incsearch_1.dump b/src/testdir/dumps/Test_smooth_incsearch_1.dump
deleted file mode 100644 (file)
index 830b855..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-|<+0#4040ff13#ffffff0@2| +0#af5f00255&|a+0#0000000&@27| @7
-| +0#af5f00255&|1|2| | +0#0000000&@35
-| +0#af5f00255&|1|3| | +0#0000000&@35
-| +0#af5f00255&|1|4| |b+1#0000000&|b+0&&@2| @31
-| +0#af5f00255&|1|5| | +0#0000000&@35
-| +0#af5f00255&|1|6| | +0#0000000&@35
-| +0#af5f00255&|1|7| | +0#0000000&@35
-|/|b> @37
diff --git a/src/testdir/dumps/Test_smooth_incsearch_2.dump b/src/testdir/dumps/Test_smooth_incsearch_2.dump
deleted file mode 100644 (file)
index 349e128..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-|<+0#4040ff13#ffffff0@2| +0#af5f00255&|a+0#0000000&@27| @7
-| +0#af5f00255&|1|2| | +0#0000000&@35
-| +0#af5f00255&|1|3| | +0#0000000&@35
-| +0#af5f00255&|1|4| |b+1#0000000&@1|b+0&&@1| @31
-| +0#af5f00255&|1|5| | +0#0000000&@35
-| +0#af5f00255&|1|6| | +0#0000000&@35
-| +0#af5f00255&|1|7| | +0#0000000&@35
-|/|b@1> @36
diff --git a/src/testdir/dumps/Test_smooth_incsearch_3.dump b/src/testdir/dumps/Test_smooth_incsearch_3.dump
deleted file mode 100644 (file)
index 0be3d21..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-|<+0#4040ff13#ffffff0@2| +0#af5f00255&|a+0#0000000&@27| @7
-| +0#af5f00255&|1|2| | +0#0000000&@35
-| +0#af5f00255&|1|3| | +0#0000000&@35
-| +0#af5f00255&|1|4| |b+1#0000000&@2|b+0&&| @31
-| +0#af5f00255&|1|5| | +0#0000000&@35
-| +0#af5f00255&|1|6| | +0#0000000&@35
-| +0#af5f00255&|1|7| | +0#0000000&@35
-|/|b@2> @35
diff --git a/src/testdir/dumps/Test_smooth_incsearch_4.dump b/src/testdir/dumps/Test_smooth_incsearch_4.dump
deleted file mode 100644 (file)
index c81c24b..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-|<+0#4040ff13#ffffff0@2| +0#af5f00255&|a+0#0000000&@27| @7
-| +0#af5f00255&|1|2| | +0#0000000&@35
-| +0#af5f00255&|1|3| | +0#0000000&@35
-| +0#af5f00255&|1|4| |b+1#0000000&@3| +0&&@31
-| +0#af5f00255&|1|5| | +0#0000000&@35
-| +0#af5f00255&|1|6| | +0#0000000&@35
-| +0#af5f00255&|1|7| | +0#0000000&@35
-|/|b@3> @34
index 7ee9fa2d273ef9d5f52696258b026b73b2e0d1d2..6d4fc81b8193f1cc2ee7ece4f53b3efaa77ca0a0 100644 (file)
@@ -903,7 +903,7 @@ endfunc
 
 " skipcol should not reset when doing incremental search on the same word
 func Test_smoothscroll_incsearch()
-  CheckScreendump
+  CheckRunVimInTerminal
 
   let lines =<< trim END
       set smoothscroll number scrolloff=0 incsearch
@@ -913,15 +913,24 @@ func Test_smoothscroll_incsearch()
   END
   call writefile(lines, 'XSmoothIncsearch', 'D')
   let buf = RunVimInTerminal('-S XSmoothIncsearch', #{rows: 8, cols: 40})
+  let g:test_is_flaky = 1
 
   call term_sendkeys(buf, "/b")
-  call VerifyScreenDump(buf, 'Test_smooth_incsearch_1', {})
+  call WaitForAssert({-> assert_match('^/b\s*$', term_getline(buf, 8))}, 1000)
+  let view1 = map(range(1, 7), {_, i -> term_getline(buf, i)})
+
   call term_sendkeys(buf, "b")
-  call VerifyScreenDump(buf, 'Test_smooth_incsearch_2', {})
+  call WaitForAssert({-> assert_match('^/bb\s*$', term_getline(buf, 8))}, 1000)
+  call assert_equal(view1, map(range(1, 7), {_, i -> term_getline(buf, i)}))
+
   call term_sendkeys(buf, "b")
-  call VerifyScreenDump(buf, 'Test_smooth_incsearch_3', {})
+  call WaitForAssert({-> assert_match('^/bbb\s*$', term_getline(buf, 8))}, 1000)
+  call assert_equal(view1, map(range(1, 7), {_, i -> term_getline(buf, i)}))
+
   call term_sendkeys(buf, "b")
-  call VerifyScreenDump(buf, 'Test_smooth_incsearch_4', {})
+  call WaitForAssert({-> assert_match('^/bbbb\s*$', term_getline(buf, 8))}, 1000)
+  call assert_equal(view1, map(range(1, 7), {_, i -> term_getline(buf, i)}))
+
   call term_sendkeys(buf, "\<CR>")
 
   call StopVimInTerminal(buf)
index 376f278c6443b132e951454023a767cfa84eca9e..95d93bb21c81da6e0f51ce4f229d74dfb902fda7 100644 (file)
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    429,
 /**/
     428,
 /**/