if the server doesn't output a logfile, the protocol file is not compared
with it! This makes tests without server (like for file://) smarter.
This commit is contained in:
@@ -345,6 +345,9 @@ sub singletest {
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# remove previous server output logfile
|
||||||
|
unlink($SERVERIN);
|
||||||
|
|
||||||
# name of the test
|
# name of the test
|
||||||
open(N, "<$TESTDIR/name$NUMBER.txt") ||
|
open(N, "<$TESTDIR/name$NUMBER.txt") ||
|
||||||
print "** Couldn't read name on test $NUMBER\n";
|
print "** Couldn't read name on test $NUMBER\n";
|
||||||
@@ -464,22 +467,24 @@ sub singletest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (! -r $PROT) {
|
if(-r $SERVERIN) {
|
||||||
print "** Missing protocol file for test $NUMBER",
|
if(! -r $PROT) {
|
||||||
", should be similar to $SERVERIN\n";
|
print "** Missing protocol file for test $NUMBER",
|
||||||
return 1;
|
", should be similar to $SERVERIN\n";
|
||||||
}
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
# The strip pattern below is for stripping off User-Agent: since
|
# The strip pattern below is for stripping off User-Agent: since
|
||||||
# that'll be different in all versions, and the lines in a
|
# that'll be different in all versions, and the lines in a
|
||||||
# RFC1876-post that are randomly generated and therefore are doomed to
|
# RFC1876-post that are randomly generated and therefore are
|
||||||
# always differ!
|
# doomed to always differ!
|
||||||
|
|
||||||
# verify the sent request
|
# verify the sent request
|
||||||
$res = compare($SERVERIN, $PROT, "protocol",
|
$res = compare($SERVERIN, $PROT, "protocol",
|
||||||
"^(User-Agent:|--curl|Content-Type: multipart/form-data; boundary=|PORT ).*\r\n");
|
"^(User-Agent:|--curl|Content-Type: multipart/form-data; boundary=|PORT ).*\r\n");
|
||||||
if($res) {
|
if($res) {
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# remove the stdout and stderr files
|
# remove the stdout and stderr files
|
||||||
|
|||||||
Reference in New Issue
Block a user