You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below is at least one of the reason why the gnu test tests/misc/usage_vs_getopt.sh is in error state.
gnu:
> b2sum -/
b2sum: invalid option -- '/'
Try 'b2sum --help' for more information.
uutils:
> ./target/release/b2sum -/
error: Found argument '-/' which wasn't expected, or isn't valid in this context
If you tried to supply `-/` as a value rather than a flag, use `-- -/`
USAGE:
b2sum [OPTIONS] [FILE]...
For more information try --help
Explanation:
Note that whereas gnu prints '/' in the error message, uutils prints '-/'.
The gnu test greps for " '*/'*" in the output error message.
In grep, the * indicates zero or more preceding character. The error message should have something like '/' and not '-/'.
I think the gnu test is wrong. I am assuming the intention of * is meant to be any character not just the preceding character. It does not make sense to have error message that'll have multiple single quote like '''/'''. The person who wrote the test might not have know the behavior of * in grep.
I am not sure if we need to fix the uutils error message to remove preceding - or fix the gnu test.
Activity
sylvestre commentedon Mar 29, 2022
yeah, I agree with your finding. I took the option to fix the test:
#3335
#3330 has been necessary too: