Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I started trying to fix the tests, case by case but I'm not sure if the direction I went for the first test is something you'd agree with. I also don't know enough about message pack, this codebase's implementation of messagepack, nor the internals of
nvim_get_commands
to know if this is dumb. so I figured I'd open up a pr and get some feedback early on.very specifically, this pr addresses only two failing tests:
as far as I can tell, what's happening is strings are sometimes nil. I'm not sure what the root case for that is, or if it's even really an issue. it appears to mostly only matter on the omitempty fields, which makes me feel like it should be alright if there's nothing there. so, rther than consume the error, I just said it was an empty string.
the other issue is the actual expect case. and this is the thing that I'm most worried is potentially wrong:
for v0.9, no commands are returned. for 10, three are returned, and they appear to be treesitter commands. for nightly, assuming 11 as well, but I'm still running 10 so I can't confirm, 4 are returned. it's the same three in v10, EditQuery, Inspect, and InspectTree. the last one is Open.
I'd imagine that
{ builtin = false }
should filter those out, but maybe since they're not vim commands and more specific to neovim, they get special treatment? I coldn't find specific docs about any of the commands to figre it out.let me know what you think. I'm happy to make any adjustments. also, let me know if you'd prefer a draft pr next time :)