mirror of
https://github.com/curl/curl.git
synced 2026-07-23 20:37:16 +03:00
runtests: add support for single-quoted attributes, use it
With this, all test data files are XML-compliant. Also: - test1158, test1186: use single quotes for the test filename attribute containing a double quote. For XML-compliance. - drop support for unquoted attributes. For XML-compliance. Closes #19926
This commit is contained in:
parent
2397be8349
commit
319298484f
3 changed files with 6 additions and 6 deletions
|
|
@ -3,7 +3,6 @@
|
|||
<keywords>
|
||||
HTTP
|
||||
HTTP FORMPOST
|
||||
notxml
|
||||
</keywords>
|
||||
</info>
|
||||
# Server-side
|
||||
|
|
@ -37,7 +36,7 @@ http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER
|
|||
-F 'file3=@"%LOGDIR/test%TESTNUMBER\".txt";type=m/f,"%LOGDIR/test%TESTNUMBER\".txt"'
|
||||
</command>
|
||||
# We create this file before the command is invoked!
|
||||
<file name=%LOGDIR/test%TESTNUMBER".txt>
|
||||
<file name='%LOGDIR/test%TESTNUMBER".txt'>
|
||||
foo bar
|
||||
This is a bar foo
|
||||
bar
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
<keywords>
|
||||
HTTP
|
||||
HTTP FORMPOST
|
||||
notxml
|
||||
</keywords>
|
||||
</info>
|
||||
# Server-side
|
||||
|
|
@ -37,7 +36,7 @@ http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER --form-escape
|
|||
-F 'file3=@"%LOGDIR/test%TESTNUMBER\".txt";type=m/f,"%LOGDIR/test%TESTNUMBER\".txt"'
|
||||
</command>
|
||||
# We create this file before the command is invoked!
|
||||
<file name=%LOGDIR/test%TESTNUMBER".txt>
|
||||
<file name='%LOGDIR/test%TESTNUMBER".txt'>
|
||||
foo bar
|
||||
This is a bar foo
|
||||
bar
|
||||
|
|
|
|||
|
|
@ -76,9 +76,10 @@ sub testcaseattr {
|
|||
for(@xml) {
|
||||
if(($_ =~ /^ *\<testcase ([^>]*)/)) {
|
||||
my $attr=$1;
|
||||
while($attr =~ s/ *([^=]*)= *(\"([^\"]*)\"|([^\> ]*))//) {
|
||||
while($attr =~ s/ *([^=]*)= *(\"([^\"]*)\"|\'([^\']*)\')//) {
|
||||
my ($var, $cont)=($1, $2);
|
||||
$cont =~ s/^\"(.*)\"$/$1/;
|
||||
$cont =~ s/^\'(.*)\'$/$1/;
|
||||
$hash{$var}=$cont;
|
||||
}
|
||||
}
|
||||
|
|
@ -108,9 +109,10 @@ sub getpartattr {
|
|||
$inside++;
|
||||
my $attr=$1;
|
||||
|
||||
while($attr =~ s/ *([^=]*)= *(\"([^\"]*)\"|([^\> ]*))//) {
|
||||
while($attr =~ s/ *([^=]*)= *(\"([^\"]*)\"|\'([^\']*)\')//) {
|
||||
my ($var, $cont)=($1, $2);
|
||||
$cont =~ s/^\"(.*)\"$/$1/;
|
||||
$cont =~ s/^\'(.*)\'$/$1/;
|
||||
$hash{$var}=$cont;
|
||||
}
|
||||
last;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue