'tr' can't both convert case and do something else and has baderror messages

Chuck Simmons <[email protected]> Mon, 06 Jan 2003 12:05:33 -0800
Newsgroups gmane.comp.gnu.textutils.bugs
Message-ID <[email protected]>
bash-2.05a$ ls -ltr `which tr`
-rwxr-xr-x    1 root     root        37374 Mar 22  2002 /usr/bin/tr


bash-2.05a$  tr '[:upper:][:punct:]' '[:lower:][ *]'
tr: tr.c:2003: main: Assertion `c1 == -1 || truncate_set1' failed.
Aborted



1)  'tr' should not assert.  It should generate a reasonable error 
message and then exit.

2)  The command should have worked.  Of course, I also claim that the 
sequence '[:lower:]' should always be allowed in set 2 and should simply 
expand to 'abcdefghijklmnopqrstuvwxyz' (or something similar depending 
on the locale).  Similarily for 'upper'.

cs