From: Jeff King Date: Tue, 11 Mar 2008 17:40:45 GMT Subject: Re: Solaris test failure for git-1.5.4.4 -- t0021-conversion.sh Message-ID: <20080311174045.GB14687@sigill.intra.peff.net> In-Reply-To: <20080311173536.GA14687@sigill.intra.peff.net> On Tue, Mar 11, 2008 at 01:35:37PM -0400, Jeff King wrote: > Looks like /usr/ucb/tr is OK with this, but /usr/bin/tr is not. Both > seem to handle the more verbose: > > tr \ > 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' \ > 'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM' And here it is in patch form. -- >8 -- t0021: tr portability fix for Solaris Solaris' /usr/bin/tr doesn't seem to like multiple character ranges in brackets (it simply prints "Bad string"). Instead, let's just enumerate the transformation we want. Signed-off-by: Jeff King --- t/t0021-conversion.sh | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh index cb86029..8fc39d7 100755 --- a/t/t0021-conversion.sh +++ b/t/t0021-conversion.sh @@ -5,7 +5,9 @@ test_description='blob conversion via gitattributes' . ./test-lib.sh cat <<\EOF >rot13.sh -tr '[a-zA-Z]' '[n-za-mN-ZA-M]' +tr \ + 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' \ + 'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM' EOF chmod +x rot13.sh -- 1.5.4.3.621.g34987