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 #12157
This commit is contained in:
parent
129a8446d2
commit
3f028f7343
1 changed files with 2 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue