test suite mods for the netrc testing stuff

This commit is contained in:
Daniel Stenberg 2002-05-21 22:20:52 +00:00
parent 51fcee6f81
commit a928f2c4aa
3 changed files with 76 additions and 13 deletions

View file

@ -7,6 +7,9 @@ my $warning=0;
my $trace=0;
sub getpartattr {
# if $part is undefined (ie only one argument) then
# return the attributes of the section
my ($section, $part)=@_;
my %hash;
@ -19,7 +22,9 @@ sub getpartattr {
if(!$inside && ($_ =~ /^ *\<$section/)) {
$inside++;
}
elsif((1 ==$inside) && ($_ =~ /^ *\<$part([^>]*)/)) {
if((1 ==$inside) && ( ($_ =~ /^ *\<$part([^>]*)/) ||
!(defined($part)) )
) {
$inside++;
my $attr=$1;
my @p=split("[ \t]", $attr);