diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-16 15:21:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-16 15:21:46 +0800 |
commit | cf3b871fa940c42e9c94257118f7d1131ebd362a (patch) | |
tree | 4520fa46d23c21d6a9f24eed5cadd087261b5f1c /test/functional/legacy/global_spec.lua | |
parent | a63eea3d238da5c048d0d74e11388425c0c0c3d2 (diff) | |
download | rneovim-cf3b871fa940c42e9c94257118f7d1131ebd362a.tar.gz rneovim-cf3b871fa940c42e9c94257118f7d1131ebd362a.tar.bz2 rneovim-cf3b871fa940c42e9c94257118f7d1131ebd362a.zip |
test: use poke_eventloop() instead of sleep(10) where possible (#19794)
Using sleep(10) to wait for typeahead to finish is flaky, especially on
macOS, where legacy/global_spec.lua has failed several times.
Diffstat (limited to 'test/functional/legacy/global_spec.lua')
-rw-r--r-- | test/functional/legacy/global_spec.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/legacy/global_spec.lua b/test/functional/legacy/global_spec.lua index 9f4528530c..ff02c41e6c 100644 --- a/test/functional/legacy/global_spec.lua +++ b/test/functional/legacy/global_spec.lua @@ -3,7 +3,7 @@ local Screen = require('test.functional.ui.screen') local clear = helpers.clear local exec = helpers.exec local feed = helpers.feed -local sleep = helpers.sleep +local poke_eventloop = helpers.poke_eventloop before_each(clear) @@ -24,7 +24,7 @@ describe(':global', function() ]]) feed(':g/foo/norm :<C-V>;<CR>') - sleep(10) -- Wait for :sleep to start + poke_eventloop() -- Wait for :sleep to start feed('<C-C>') screen:expect([[ ^foo | @@ -37,7 +37,7 @@ describe(':global', function() -- Also test in Ex mode feed('gQg/foo/norm :<C-V>;<CR>') - sleep(10) -- Wait for :sleep to start + poke_eventloop() -- Wait for :sleep to start feed('<C-C>') screen:expect([[ {0: }| |