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/t1300-repo-config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 't/t1300-repo-config.sh') diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh index 4928a5711..b36a9012e 100755 --- a/t/t1300-repo-config.sh +++ b/t/t1300-repo-config.sh @@ -657,12 +657,12 @@ Qsection.sub=section.val4 Qsection.sub=section.val5Q EOF -git config --null --list | tr '\000' 'Q' > result +git config --null --list | perl -pe 'y/\000/Q/' > result echo >>result test_expect_success '--null --list' 'cmp result expect' -git config --null --get-regexp 'val[0-9]' | tr '\000' 'Q' > result +git config --null --get-regexp 'val[0-9]' | perl -pe 'y/\000/Q/' > result echo >>result test_expect_success '--null --get-regexp' 'cmp result expect' -- cgit v1.2.1