httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodent of Unusual Size <Ken.C...@Golux.Com>
Subject Expectations in apache/404.t
Date Mon, 22 Oct 2001 15:09:18 GMT
H'm.  In trying to figure out why apache/404.t was
failing test 1 against Apache 1.3, I discovered that
it is apparently checking for the HTTP response line:

> my $four_oh_four = GET_STR "/404/not/found/test";
> ok ($four_oh_four =~ /HTTP\/1\.[01] Not Found/);

Well, GET_STR's result in this case doesn't include
the response line, but an analysis of it instead:

> RC: 404 (Not Found)
> Message: Not Found

Where is GET_STR defined, and why does this test pass on
some combinations of versions and fail on others?  I assume
because GET_STR's return semantics have changed..

Anyone see any reason not to change this test to

ok (($four_oh_four =~ /HTTP\/1\.[01] Not Found/)
    || ($four_oh_four =~ /RC:\s+404.*Message:\s+Not Found/s));

#ken	P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"All right everyone!  Step away from the glowing hamburger!"

View raw message