aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-11-13 07:28:40 +0800
committerGitHub <noreply@github.com>2024-11-13 07:28:40 +0800
commit1643c49514cef2ab6fafea1959d66503b0fb045e (patch)
treeca1e82a30bff9a16a94be9377d7974214997613a
parent86b737649bb8c51649a21033c0e365f53f2bc04a (diff)
downloadrneovim-1643c49514cef2ab6fafea1959d66503b0fb045e.tar.gz
rneovim-1643c49514cef2ab6fafea1959d66503b0fb045e.tar.bz2
rneovim-1643c49514cef2ab6fafea1959d66503b0fb045e.zip
vim-patch:9.1.0860: tests: mouse_shape tests use hard code sleep value (#31184)
Problem: tests: mouse_shape tests use hard code sleep value (Bram Moolenaar) Solution: Use WaitForAssert() instead (Yee Cheng Chin) related: vim/vim#12157 closes: vim/vim#16042 https://github.com/vim/vim/commit/24078e39cd10b8a65af5297ebe12ddf1e550167a Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
-rw-r--r--test/old/testdir/test_normal.vim6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/old/testdir/test_normal.vim b/test/old/testdir/test_normal.vim
index faa93c4b61..c89e73bada 100644
--- a/test/old/testdir/test_normal.vim
+++ b/test/old/testdir/test_normal.vim
@@ -3958,8 +3958,7 @@ func Test_mouse_shape_after_failed_change()
END
call writefile(lines, 'Xmouseshape.vim', 'D')
call RunVim([], [], "-g -S Xmouseshape.vim")
- sleep 300m
- call assert_equal(['busy', 'arrow'], readfile('Xmouseshapes'))
+ call WaitForAssert({-> assert_equal(['busy', 'arrow'], readfile('Xmouseshapes'))}, 300)
call delete('Xmouseshapes')
endfunc
@@ -3990,8 +3989,7 @@ func Test_mouse_shape_after_cancelling_gr()
END
call writefile(lines, 'Xmouseshape.vim', 'D')
call RunVim([], [], "-g -S Xmouseshape.vim")
- sleep 300m
- call assert_equal(['beam', 'arrow'], readfile('Xmouseshapes'))
+ call WaitForAssert({-> assert_equal(['beam', 'arrow'], readfile('Xmouseshapes'))}, 300)
call delete('Xmouseshapes')
endfunc