diff options
Diffstat (limited to 'tests/getpart.pm')
-rw-r--r-- | tests/getpart.pm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/getpart.pm b/tests/getpart.pm index 58e1a6006..d28800088 100644 --- a/tests/getpart.pm +++ b/tests/getpart.pm @@ -3,6 +3,9 @@ my @xml; +my $warning=0; +my $trace=0; + sub getpartattr { my ($section, $part)=@_; @@ -63,12 +66,21 @@ sub getpart { $inside--; } elsif((1==$inside) && ($_ =~ /^ *\<\/$section/)) { + if($trace) { + print STDERR "*** getpart.pm: $section/$part returned data!\n"; + } + if(!@this && $warning) { + print STDERR "*** getpart.pm: $section/$part returned empty!\n"; + } return @this; } elsif(2==$inside) { push @this, $_; } } + if($warning) { + print STDERR "*** getpart.pm: $section/$part returned empty!\n"; + } return @this; #empty! } |