Skip to content

Commit

Permalink
test: Use WaitForAssert instead of sleep for faster mouse shape tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ychin committed Nov 12, 2024
1 parent 129a844 commit 3f028f7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/testdir/test_normal.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3f028f7

Please sign in to comment.