Skip to content

Commit

Permalink
t0021: tr portability fix for Solaris
Browse files Browse the repository at this point in the history
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Mar 12, 2008
1 parent fc99469 commit 7339eb0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion t/t0021-conversion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7339eb0

Please sign in to comment.