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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Mar 11, 2008 at 13:40 UTC
7339eb082343df556c27fb0df5dd36a21714284e
1 file changed
+3
-1
t/t0021-conversion.sh
+3
-1
@@ -5,7 +5,9 @@ test_description='blob conversion via gitattributes'
5
. ./test-lib.sh
6
7
cat <<\EOF >rot13.sh
8
-tr '[a-zA-Z]' '[n-za-mN-ZA-M]'
8
+tr \
9
+ 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' \
10
+ 'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'
11
EOF
12
chmod +x rot13.sh
13