diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-05-21 22:20:52 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-05-21 22:20:52 +0000 |
commit | a928f2c4aab41db8f6fdf4ba412e6c455e4ccf96 (patch) | |
tree | e52594d65b1f0c0f27af1d2a3176a778beeaa7a2 /tests/getpart.pm | |
parent | 51fcee6f811c46c55cefebb726e6c4dee7dedd13 (diff) | |
download | curl-a928f2c4aab41db8f6fdf4ba412e6c455e4ccf96.tar.gz |
test suite mods for the netrc testing stuff
Diffstat (limited to 'tests/getpart.pm')
-rw-r--r-- | tests/getpart.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/getpart.pm b/tests/getpart.pm index d28800088..7449be983 100644 --- a/tests/getpart.pm +++ b/tests/getpart.pm @@ -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); |