Closed
Description
$ true | cargo run -q tr '[:lower:]a' '[:upper:]'
$ true | tr '[:lower:]a' '[:upper:]'
tr: when translating with string1 longer than string2,
the latter string must not end with a character class
[$? = 1]
$ true | tr -t '[:lower:]a' '[:upper:]'
I see two options:
- Either we claim this is an extension of
tr
, in that case we should document it on https://uutils.github.io/coreutils/docs/extensions.html - Or this is a bug (because it's a difference in behavior to GNU), then we should fix that. Make sure you catch that weird case where truncating removes the warning again!
Found while reading #6445, even though it wasn't introduced there.