From: Dave Mitchell Date: Mon, 9 Aug 2004 18:28:33 +0000 (+0000) Subject: made eq_array in t/test.pl handle undef values better X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=135d199b8068090520a7a5e9a0462a9565e29293;p=p5sagit%2Fp5-mst-13.2.git made eq_array in t/test.pl handle undef values better p4raw-id: //depot/perl@23208 --- diff --git a/t/test.pl b/t/test.pl index 56bf355..a35eb83 100644 --- a/t/test.pl +++ b/t/test.pl @@ -295,6 +295,9 @@ sub eq_array { my ($ra, $rb) = @_; return 0 unless $#$ra == $#$rb; for my $i (0..$#$ra) { + next if !defined $ra->[$i] && !defined $rb->[$i]; + return 0 if !defined $ra->[$i]; + return 0 if !defined $rb->[$i]; return 0 unless $ra->[$i] eq $rb->[$i]; } return 1;