Skip to content

expr: fix unexpected argument error #5575

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

Closed
wants to merge 1 commit into from
Closed

Conversation

zhitkoff
Copy link
Contributor

@zhitkoff zhitkoff commented Nov 22, 2023

Fixing error message for Token::PrefixOp tokens when they are not the first token in the command line - in line with GNU behavior.
And updated tests

Copy link
Member

@tertsdiepraam tertsdiepraam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I don't this is quite right, although it is an improvement. The problem is with complex expressions like:

env expr \( substr hello 2 world \) '&' boop

So substr (and any other keyword) does not need to be the first argument necessarily.

Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/tail/retry is no longer failing!
Congrats! The gnu test tests/tail/symlink is no longer failing!
GNU test failed: tests/tail/inotify-dir-recreate. tests/tail/inotify-dir-recreate is passing on 'main'. Maybe you have to rebase?

@cakebaker
Copy link
Contributor

Closing this PR because it's fixed in #5578

@cakebaker cakebaker closed this Nov 24, 2023
@zhitkoff zhitkoff deleted the test-expr branch December 3, 2023 21:07
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.

3 participants