-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
uniq
: pass remaining GNU tests
#5994
Conversation
GNU testsuite comparison:
|
@sylvestre checking in to see if you have any other comments / suggestions on this PR |
//! | ||
use std::env; | ||
|
||
pub const OBSOLETE: usize = 199209; |
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.
what about using an enum here?
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.
yes, initially i tried to implement it as an enum, but discarded in favor of these constants - unfortunately it is inconsistently checked in GNU, so was easier to implement this way for now. Might need to give it another try later on as these will be needed to fully cover GNU tests for at least 2 more utilities
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.
ok, thanks
Impressive work! |
This PR makes the following changes in order to pass GNU
tests/uniq/uniq.pl
:split
. Unfortunately it is not possible to implement it with just Clap for all required test casesposix
with 3 constants and a single function to return POSIX version based on_POSIX2_VERSION
environment variable. This module would be needed to add similar functionality tosort
,tail
andtouch
later on (most likely to finalize their GNU tests compliance as well)u8
bytes sequence. This is required to pass GNUschar
test case and in general aligns the behavior with GNU versionShould also fix #3509