Loading tests/getpart.pm +19 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,25 @@ sub getpart { return @this; #empty! } sub partexists { my ($section, $part)=@_; my $inside = 0; for(@xml) { if(!$inside && ($_ =~ /^ *\<$section/)) { $inside++; } elsif((1 == $inside) && ($_ =~ /^ *\<$part[ \>]/)) { return 1; # exists } elsif((1 == $inside) && ($_ =~ /^ *\<\/$section/)) { return 0; # does not exist } } return 0; # does not exist } # Return entire document as list of lines sub getall { return @xml; Loading tests/runtests.pl +1 −1 Original line number Diff line number Diff line Loading @@ -3499,7 +3499,7 @@ sub singletest { my $outputok; for my $partsuffix (('', '1', '2', '3', '4')) { my @outfile=getpart("verify", "file".$partsuffix); if(@outfile) { if(@outfile || partexists("verify", "file".$partsuffix) ) { # we're supposed to verify a dynamically generated file! my %hash = getpartattr("verify", "file".$partsuffix); Loading Loading
tests/getpart.pm +19 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,25 @@ sub getpart { return @this; #empty! } sub partexists { my ($section, $part)=@_; my $inside = 0; for(@xml) { if(!$inside && ($_ =~ /^ *\<$section/)) { $inside++; } elsif((1 == $inside) && ($_ =~ /^ *\<$part[ \>]/)) { return 1; # exists } elsif((1 == $inside) && ($_ =~ /^ *\<\/$section/)) { return 0; # does not exist } } return 0; # does not exist } # Return entire document as list of lines sub getall { return @xml; Loading
tests/runtests.pl +1 −1 Original line number Diff line number Diff line Loading @@ -3499,7 +3499,7 @@ sub singletest { my $outputok; for my $partsuffix (('', '1', '2', '3', '4')) { my @outfile=getpart("verify", "file".$partsuffix); if(@outfile) { if(@outfile || partexists("verify", "file".$partsuffix) ) { # we're supposed to verify a dynamically generated file! my %hash = getpartattr("verify", "file".$partsuffix); Loading