-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix(nl): allow repeated flags to match GNU nl behavior (fixes #9132) #9140
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
base: main
Are you sure you want to change the base?
Conversation
|
GNU testsuite comparison: |
5238335 to
a2db784
Compare
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
a2db784 to
8f1bd52
Compare
CodSpeed Performance ReportMerging #9140 will not alter performanceComparing Summary
Footnotes
|
|
GNU testsuite comparison: |
8f1bd52 to
2d56770
Compare
|
GNU testsuite comparison: |
2d56770 to
a4819ba
Compare
|
GNU testsuite comparison: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test_repeated_footer_numbering_flag looks good now. Unfortunately, you have undone the previous changes to test_repeated_header_numbering_flag, test_repeated_join_blank_lines_flag, and test_repeated_section_delimiter_flag with the most recent push and the issues I mentioned yesterday are back :|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests fixed and passing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, now you have undone the changes to test_repeated_footer_numbering_flag :| The other changes look good.
a4819ba to
1ed8792
Compare
• Enable args_override_self(true) for repeated flags • Remove unnecessary ArgAction::Append calls • Fix tests to verify last value wins, not just succeeds • Update test output validation for repeated flags Fixes uutils#9132
1ed8792 to
aff651d
Compare
|
GNU testsuite comparison: |
| .args(&["-d", ":", "-d", "|"]) | ||
| .pipe_in("|:|:|:\na\nb\nc") | ||
| .succeeds() | ||
| .stdout_is("\n a\n b\n c\n"); // header line not recognized with -d| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment is incorrect. The piped in input is recognized as a header, otherwise |:|:|: would show up in the output.
| .stdout_is("\n a\n b\n c\n"); // header line not recognized with -d| | |
| .stdout_is("\n a\n b\n c\n"); |
Fixes #9132. uu-nl now accepts repeated flags like GNU nl. Added args_override_self(true)to all 10 value-accepting arguments.