Browse Source

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>
maint
Jeff King 17 years ago committed by Junio C Hamano
parent
commit
7339eb0823
  1. 4
      t/t0021-conversion.sh

4
t/t0021-conversion.sh

@ -5,7 +5,9 @@ test_description='blob conversion via gitattributes' @@ -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


Loading…
Cancel
Save