aboutsummaryrefslogtreecommitdiff
path: root/tests/getpart.pm
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-05-21 22:20:52 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-05-21 22:20:52 +0000
commita928f2c4aab41db8f6fdf4ba412e6c455e4ccf96 (patch)
treee52594d65b1f0c0f27af1d2a3176a778beeaa7a2 /tests/getpart.pm
parent51fcee6f811c46c55cefebb726e6c4dee7dedd13 (diff)
test suite mods for the netrc testing stuff
Diffstat (limited to 'tests/getpart.pm')
-rw-r--r--tests/getpart.pm7
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);