Skip to content
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

tr: Raise error if set2 is too big on complemented class #6564

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

RenjiSann
Copy link
Contributor

Fixes #6345

Copy link
Collaborator

@BenWiederhake BenWiederhake left a comment

Choose a reason for hiding this comment

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

The code change itself is great! It's really straight-forward, thanks to the previous PRs.

I have some requests about the test: Please test the positive case, fix a technically-incorrect comment, and make sure the test checks for the correct failure reason. (Details below.)

tests/by-util/test_tr.rs Show resolved Hide resolved
tests/by-util/test_tr.rs Outdated Show resolved Hide resolved
tests/by-util/test_tr.rs Outdated Show resolved Hide resolved
@RenjiSann
Copy link
Contributor Author

Force push fixed this:

  • Add The complement of ('[:upper:]').
  • Add a test with 230 x.
  • Check the expected error message

Copy link
Collaborator

@BenWiederhake BenWiederhake left a comment

Choose a reason for hiding this comment

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

Code looks good to me, tests both the positive and the negative case, remaining failures are unrelated issues with CI: #6534, #6569, #6570 (twice).

@BenWiederhake BenWiederhake merged commit 128335a into uutils:main Jul 15, 2024
64 of 68 checks passed
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.

tr: Raise error when STRING2 argument has unreachable character during complement
2 participants