1
0
Fork 0
mirror of https://github.com/vim/vim synced 2025-03-26 11:45:22 +01:00

test: Use WaitForAssert instead of sleep for faster mouse shape tests

See 
This commit is contained in:
Yee Cheng Chin 2024-11-12 13:11:57 -05:00
parent 129a8446d2
commit 3f028f7343
No known key found for this signature in database
GPG key ID: EFBCC8AA4E506FE2

View file

@ -3948,8 +3948,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
@ -3980,8 +3979,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