summaryrefslogtreecommitdiff
path: root/tests/getpart.pm
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-08-04 17:36:31 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-08-04 17:36:31 +0200
commitd2c22411afd664bfc1959c41e301781e4cd725f3 (patch)
tree98e170b2f72b569023f044982144973a9f6457d9 /tests/getpart.pm
parentc4142034ff4501a6b6dcb389e7b6daa1aca7facb (diff)
downloadcurl-d2c22411afd664bfc1959c41e301781e4cd725f3.tar.gz
getpart.pm: when no part match, return blank when section ends
Diffstat (limited to 'tests/getpart.pm')
-rw-r--r--tests/getpart.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/getpart.pm b/tests/getpart.pm
index 4d47736b6..83e56ca92 100644
--- a/tests/getpart.pm
+++ b/tests/getpart.pm
@@ -63,6 +63,10 @@ sub getpartattr {
}
last;
}
+ # detect end of section when part wasn't found
+ elsif((1 ==$inside) && ($_ =~ /^ *\<\/$section\>/)) {
+ last;
+ }
elsif((2 ==$inside) && ($_ =~ /^ *\<\/$part/)) {
$inside--;
}