Permalink
Browse files

Anonymous Coward reported a bug in the code that skips testing a

broken HTTP::Request object.  This commit should fix it.
  • Loading branch information...
1 parent 838a80d commit 84d0eb67344a8f24fa69c353a9b242ebde61dfe2 @rcaputo committed May 26, 2004
Showing with 14 additions and 4 deletions.
  1. +14 −4 tests/30_filter_httpd.t
@@ -122,10 +122,20 @@ Connection: Keep-Alive
is($req->url, 'http://localhost/foo.mhtml',
'simple post: HTTP::Request object contains proper URI');
- if ($^O eq "MSWin32" and $] < 5.008003) {
- skip("Please upgrade ActivePerl to pass this test.");
- }
- else {
+ # The HTTP::Request bundled with ActivePerl 5.6.1 causes a test
+ # failure here. The one included in ActivePerl 5.8.3 works fine.
+ # It was suggested by an anonymous bug reporter to test against
+ # HTTP::Request's version rather than Perl's, so we're doing that
+ # here. Theoretically we shouldn't get this far. The Makefile
+ # magic should strongly suggest HTTP::Request 1.34. But people
+ # install (or fail to) the darnedest things, so I thought it was
+ # safe to check here rather than fail the test due to operator
+ # error.
+ SKIP: {
+ my $required_http_request_version = 1.34;
+ skip("simple post: Please upgrade HTTP::Request to $required_http_request_version or later", 1)
+ if $^O eq "MSWin32" and $HTTP::Request::VERSION < $required_http_request_version;
+
is($req->content, "I=like&tasty=pie\n",
'simple post: HTTP::Request object contains proper content');
}

0 comments on commit 84d0eb6

Please sign in to comment.