From e85fe4d85bc7654af20ccf8054ab6922665405e5 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 12 Mar 2008 17:31:06 -0400 Subject: more tr portability test script fixes Dealing with NULs is not always safe with tr. On Solaris, incoming NULs are silently deleted by both the System V and UCB versions of tr. When converting to NULs, the System V version works fine, but the UCB version silently ignores the request to convert the character. This patch changes all instances of tr using NULs to use "perl -pe 'y///'" instead. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- t/t4020-diff-external.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/t4020-diff-external.sh') diff --git a/t/t4020-diff-external.sh b/t/t4020-diff-external.sh index 888293361d..bf8f778a47 100755 --- a/t/t4020-diff-external.sh +++ b/t/t4020-diff-external.sh @@ -99,7 +99,7 @@ test_expect_success 'no diff with -diff' ' git diff | grep Binary ' -echo NULZbetweenZwords | tr Z '\000' > file +echo NULZbetweenZwords | perl -pe 'y/Z/\000/' > file test_expect_success 'force diff with "diff"' ' echo >.gitattributes "file diff" && -- cgit v1.2.1