Skip to content

expr: fix unexpected argument error#5575

Closed
zhitkoff wants to merge 1 commit intouutils:mainfrom
zhitkoff:test-expr
Closed

expr: fix unexpected argument error#5575
zhitkoff wants to merge 1 commit intouutils:mainfrom
zhitkoff:test-expr

Conversation

@zhitkoff
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

@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.

@github-actions
Copy link
Copy Markdown

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
Copy Markdown
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