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

Refuse to translate if set1 is longer than set2 and set2 ends in a character class #6470

Merged
merged 1 commit into from
Jun 16, 2024

Conversation

cvonelm
Copy link
Contributor

@cvonelm cvonelm commented Jun 15, 2024

I think we should fall in line with GNU behaviour here.

If you really think you need to do this:

tr [:lower:]123 [:upper:]

you can already do this:

tr [:lower:]123 [:upper:]Z

which does the same thing and is more explicit about which character is repeated to fill set2.

(Although generally, I think that if you are at that point you are already using the wrong tool).

However, I do not have strong opinions on this and would happily implement this the other way if someone is clearly in favour of that.

…aracter class

tr [:lower:]a [:upper:]

fails in GNU tr, so print an error for tr too.
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)

@cakebaker cakebaker merged commit ef68e60 into uutils:main Jun 16, 2024
67 of 68 checks passed
@cakebaker
Copy link
Contributor

Thanks!

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.

2 participants