tests/getpart: fix getpartattr to work with "data" and "data2"

This commit is contained in:
Daniel Stenberg 2022-06-08 16:32:46 +02:00
parent 5912da253b
commit d391c57990
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@ -55,7 +55,7 @@ sub getpartattr {
if(!$inside && ($_ =~ /^ *\<$section/)) {
$inside++;
}
if((1 ==$inside) && ( ($_ =~ /^ *\<$part([^>]*)/) ||
if((1 ==$inside) && ( ($_ =~ /^ *\<$part ([^>]*)/) ||
!(defined($part)) )
) {
$inside++;