mirror of
https://github.com/vim/vim.git
synced 2026-05-28 00:21:37 +02:00
patch 9.2.0429: tests: flaky screendump Test_smoothscroll_incsearch()
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>
This commit is contained in:
committed by
Christian Brabandt
parent
e4413c5df7
commit
e25933014c
-8
@@ -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
|
||||
-8
@@ -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
|
||||
-8
@@ -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
|
||||
-8
@@ -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
|
||||
@@ -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)
|
||||
|
||||
@@ -729,6 +729,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
429,
|
||||
/**/
|
||||
428,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user