Skip to content

Commit

Permalink
Avoid perl in t1300-repo-config
Browse files Browse the repository at this point in the history
It fixes the test on system where ActiveState Perl is used.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Alex Riesen authored and Junio C Hamano committed Jun 29, 2007
1 parent 7051c3b commit 2b9a502
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions t/t1300-repo-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -529,25 +529,23 @@ cat > .git/config <<\EOF
EOF

cat > expect <<\EOF
Key: section.sub=section.val1
Value: foo=bar
Key: section.sub=section.val2
Value: foo
bar
Key: section.sub=section.val3
Value:
section.sub=section.val1
foo=barQsection.sub=section.val2
foo
barQsection.sub=section.val3
Key: section.sub=section.val4
Value:
Key: section.sub=section.val5
Qsection.sub=section.val4
Qsection.sub=section.val5Q
EOF

git config --null --list | perl -0ne 'chop;($key,$value)=split(/\n/,$_,2);print "Key: $key\n";print "Value: $value\n" if defined($value)' > result
git config --null --list | tr '[\000]' 'Q' > result
echo >>result

test_expect_success '--null --list' 'cmp result expect'

git config --null --get-regexp 'val[0-9]' | perl -0ne 'chop;($key,$value)=split(/\n/,$_,2);print "Key: $key\n";print "Value: $value\n" if defined($value)' > result
git config --null --get-regexp 'val[0-9]' | tr '[\000]' 'Q' > result
echo >>result

test_expect_success '--null --get-regexp' 'cmp result expect'

Expand Down

0 comments on commit 2b9a502

Please sign in to comment.