-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
[RFC] Load-adjust timer tests #9292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
If someone wants to do that, sure. It's not a one-time task: more tests will fail over time, and those need to be monitored, and later fixed. |
Then I try looking into the issues of this PR (after I had a look how you handled similar issues earlier). |
20f371d
to
2b1c42f
Compare
ab21b35
to
e4e4eff
Compare
e39c633
to
c915c12
Compare
cb6d300
to
001c54c
Compare
I think this PR is ready now. 💪 (The failing macOS jobs are due to the unrelated |
The Vim version of Test_help_tagjump() tests for `:help sm?le` here. That command got removed from Nvim, so the test was changed to check against `:help sp?it` instead. The new test already handled the case that on Win `:h split` would jump to the entry for split() and on all other systems to the entry for :split. Then this commit happened: bb3aa82 lua/stdlib: vim.inspect, string functions Since then `:h split` would jump to split() for macOS as well! I'm not sure why. Anyway, instead of adding another check for has('mac'), we change the test once more to be more akin to the original test. Instead of testing for :smile, which is exclusive to Vim, we check against :checkhealth, which is exclusive to Nvim.
func Test_oneshot() | ||
let g:val = 0 | ||
let timer = timer_start(50, 'MyHandler') | ||
let slept = WaitFor('g:val == 1') | ||
call assert_equal(1, g:val) | ||
if has('reltime') | ||
call assert_inrange(40, 120, slept) | ||
call s:assert_inrange(40, 120, slept) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be clearer if LoadAdjust() was explicitly called here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, but you merged it already. :P I guess we just silently do it the next time that file is changed in any way.
Also, don't compute load factor unless load_adjust() was called, it slows down the test suite. ref neovim#9292
Test_help_tagjump()