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
[RFC] hlsearch/incsearch screen tests + convert test 63 #1930
Conversation
also converting test 63 as it is a bit related, but there is some issues. Apparently a vimscript function can both throw an error and at the same time (as if nothing happened) return an ordinary value, and I don't know how to check that using |
Yes, I believe that's true, @ZyX-I mentioned it before. I think the lua vim_eval should multi-return a |
Didn't know that. But... then, what would the control flow be? I mean, how are you supposed to manage such a thing? |
@elmart That, exactly, is the question. apparently |
@justinmk I think |
Not sure if I'm missing something but if
Why would we need a separate vim_try_eval method? |
No i meant vim_eval should still throw an error (i e signal an msgpack
|
Oh, good point. |
More trouble on the same theme: the following causes the test to just freeze
The freeze is actually on the |
Problem was a "Press ENTER to continue" that blocked the event loop. (weird, as the same problem ought to have been at |
23b7df1
to
8e9d729
Compare
Now it it working, but those |
No. But if there were, the tests would not simulate the user experience... |
Good point. But do you know if |
When I think of it more, nothing should potentially consume input between the final |
I haven't seen any flakiness related to that in the 30 tests I have been working on. But I do not know for sure. |
Ok, removed the TODOs as the current implementation is closest to the legacy test (and probably to realistic user experience). Marked RFC, but marvim didn't seem to notice... |
I added a small cleanup to screen_basic_test I forgot to do when working on #1883 |
Rebased and fixed some whitespace. |
4b1319a
to
9ad14d1
Compare
👍 LGTM I'm not sure if you are aware, but test hangs can be debugged more easily if you attach the pygtk UI by adding a |
@tarruda Thanks, I think I saw it in the code but I have not tested it yet. It would be good if events are processed in the "press ENTER" state later on, but until then, I think |
And given constant screen size it should be deterministic which error messages require this prompt, so this should be safe. |
That probably is the main reason I want to eventually refactor the user dialog/message interface to use the terminal abstraction being implemented in #2076. If we remove most "block the world' prompt code, then nvim will always be in a state where it can process vimscript and consequently there will be no need for this distinction between deferred and non deferred events. |
@tarruda Bump. Something missing here, or could this be merged? |
looking now |
Remove legacy tests from the old makefile that were forgotten after the test migration. The tests are: - test 26 migrated in da3ade6 merged in neovim#1420 - test 27 migrated in ac52d84 merged in neovim#1328 - test 43 migrated in c915958 merged in neovim#1420 - test 46 migrated in 5ea94e1 merged in neovim#1428 - test 63 migrated in a040aa9 merged in neovim#1930 Additionally the tests 71 and 72 where removed in 85338fe together with the +cryptv feature.
Remove legacy tests from the old makefile that were forgotten after the test migration. The tests are: - test 26 migrated in da3ade6 merged in #1420 - test 27 migrated in ac52d84 merged in #1328 - test 43 migrated in c915958 merged in #1420 - test 46 migrated in 5ea94e1 merged in #1328 - test 63 migrated in a040aa9 merged in #1930 Additionally the tests 71 and 72 where removed in 85338fe together with the +cryptv feature.
Remove legacy tests from the old makefile that were forgotten after the test migration. The tests are: - test 26 migrated in da3ade6 merged in neovim#1420 - test 27 migrated in ac52d84 merged in neovim#1328 - test 43 migrated in c915958 merged in neovim#1420 - test 46 migrated in 5ea94e1 merged in neovim#1328 - test 63 migrated in a040aa9 merged in neovim#1930 Additionally the tests 71 and 72 where removed in 85338fe together with the +cryptv feature.
work in progress. Should also test
matchadd/pos/
as its implementation is quite entangled withsearch_hl
(ref #1841 )