On 29/09/10 12:59, Eric Blake wrote: Thanks for the review.
I agree with your tweaks, though since I've already pushed, I don't think it's worth amending. >> + >> + # Ensure we extend string2 appropriately >> + tr '[:upper:]- ' '[:lower:]_' < /dev/null || _fail=1 > > Seems non-portable to have a - in the middle, even though here the left > side is a character class instead of a byte. I think you'd better pick > a different character than -, or move the - to the end. Well that was part by design, as it's our tr that we're testing, and this will flag if we inadvertently change range processing within tr. >> + # Ensure the size of the case classes are accounted >> + # for as a unit. >> + echo 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | >> + tr '[:upper:]A-B' '[:lower:]0' >out || _fail=1 >> + echo '00cdefghijklmnopqrstuvwxyz' > exp > > Huh? A and B are both in [:upper:]; when a character is listed more > than once in string1, it is only transliterated according to the first > listing. I think this should be 'abc...' not '00c...' for the expected > results. Does POSIX specify that? That's not what we do, nor what I would expect. $ echo 'A' | LANG=C tr 'AA' '01' 1 cheers, Pádraig.
