Skip to content
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

Update tests for the newcommand package, and update code #1200

Open
wants to merge 2 commits into
base: test-begingroup
Choose a base branch
from

Conversation

dpvc
Copy link
Member

@dpvc dpvc commented Feb 4, 2025

This PR updates the test for the newcommand extension. In the NewcommandUtil.ts, the case where j < 0 does not occur, as j is reduced only on line 213, and that is only when hasBraces is true. For that to be the case, there would have had to have been an initial open brace, in which case line 206 would have called GetArgument(), which would find a matching close brace, so there must be at least two characters (the two braces), and j would be at least 2 before it is decremented. So it never gets below 0.

@dpvc dpvc requested a review from zorkow February 4, 2025 20:55
@dpvc dpvc added this to the v4.0 milestone Feb 4, 2025
@dpvc dpvc changed the base branch from update-test-framework to test-begingroup February 5, 2025 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant