[poe-commits] poe/t 30_filter_httpd.t,1.9,1.10
Brought to you by:
rcaputo
From: <rc...@us...> - 2004-05-22 05:17:09
|
Update of /cvsroot/poe/poe/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4693/t Modified Files: 30_filter_httpd.t Log Message: Worked around t/30_filter_httpd.t failing on outdated versions of ActivePerl. Updated the dependencies versions to request the most recent ActivePerl LWP modules. Skip the failing test on ActivePerl versions before 5.008003. The things I do for a clean CPAN Testers bill of health.... Index: 30_filter_httpd.t =================================================================== RCS file: /cvsroot/poe/poe/t/30_filter_httpd.t,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** 30_filter_httpd.t 18 Apr 2004 19:21:34 -0000 1.9 --- 30_filter_httpd.t 22 May 2004 05:16:59 -0000 1.10 *************** *** 25,29 **** { # simple get {{{ ! my $filter; --- 25,29 ---- { # simple get {{{ ! my $filter; *************** *** 42,46 **** my $req = shift @$data; ! is(ref $req, 'HTTP::Request', 'simple get: get() returns HTTP::Request object'); is($req->method, 'GET', 'simple get: HTTP::Request object contains proper HTTP method'); --- 42,46 ---- my $req = shift @$data; ! is(ref $req, 'HTTP::Request', 'simple get: get() returns HTTP::Request object'); is($req->method, 'GET', 'simple get: HTTP::Request object contains proper HTTP method'); *************** *** 51,55 **** { # More complex get {{{ ! my $filter; --- 51,55 ---- { # More complex get {{{ ! my $filter; *************** *** 73,100 **** is(ref $req, 'HTTP::Request', 'HTTP 1.0 get: get() returns HTTP::Request object'); ! ! is($req->method, 'GET', 'HTTP 1.0 get: HTTP::Request object contains proper HTTP method'); ! is($req->url, '/foo.html', 'HTTP 1.0 get: HTTP::Request object contains proper URI'); ! ! is($req->content, '', 'HTTP 1.0 get: HTTP::Request object properly contains no content'); ! is($req->header('User-Agent'), 'Wget/1.8.2', 'HTTP 1.0 get: HTTP::Request object contains proper User-Agent header'); ! ! is($req->header('Host'), 'localhost:8080', 'HTTP 1.0 get: HTTP::Request object contains proper Host header'); ! ! is($req->header('Accept'), '*/*', 'HTTP 1.0 get: HTTP::Request object contains proper Accept header'); ! is($req->header('Connection'), 'Keep-Alive', 'HTTP 1.0 get: HTTP::Request object contains proper Connection header'); } # }}} ! { # simple post {{{ my $post_request = POST 'http://localhost/foo.mhtml', [ 'I' => 'like', 'tasty' => 'pie' ]; --- 73,100 ---- is(ref $req, 'HTTP::Request', 'HTTP 1.0 get: get() returns HTTP::Request object'); ! ! is($req->method, 'GET', 'HTTP 1.0 get: HTTP::Request object contains proper HTTP method'); ! is($req->url, '/foo.html', 'HTTP 1.0 get: HTTP::Request object contains proper URI'); ! ! is($req->content, '', 'HTTP 1.0 get: HTTP::Request object properly contains no content'); ! is($req->header('User-Agent'), 'Wget/1.8.2', 'HTTP 1.0 get: HTTP::Request object contains proper User-Agent header'); ! ! is($req->header('Host'), 'localhost:8080', 'HTTP 1.0 get: HTTP::Request object contains proper Host header'); ! ! is($req->header('Accept'), '*/*', 'HTTP 1.0 get: HTTP::Request object contains proper Accept header'); ! is($req->header('Connection'), 'Keep-Alive', 'HTTP 1.0 get: HTTP::Request object contains proper Connection header'); } # }}} ! { # simple post {{{ my $post_request = POST 'http://localhost/foo.mhtml', [ 'I' => 'like', 'tasty' => 'pie' ]; *************** *** 104,108 **** my $str = $post_request->as_string; ! my $data; eval { $data = $filter->get([ $str ]); }; --- 104,108 ---- my $str = $post_request->as_string; ! my $data; eval { $data = $filter->get([ $str ]); }; *************** *** 113,117 **** my $req = shift @$data; ! is(ref $req, 'HTTP::Request', 'simple post: get() returns HTTP::Request object'); --- 113,117 ---- my $req = shift @$data; ! is(ref $req, 'HTTP::Request', 'simple post: get() returns HTTP::Request object'); *************** *** 123,128 **** 'simple post: HTTP::Request object contains proper URI'); ! is($req->content, "I=like&tasty=pie\n", 'simple post: HTTP::Request object contains proper content'); is($req->header('Content-Type'), 'application/x-www-form-urlencoded', --- 123,133 ---- 'simple post: HTTP::Request object contains proper URI'); ! if ($^O eq "MSWin32" and $] < 5.008003) { ! skip("Please upgrade ActivePerl to pass this test."); ! } ! else { ! is($req->content, "I=like&tasty=pie\n", 'simple post: HTTP::Request object contains proper content'); + } is($req->header('Content-Type'), 'application/x-www-form-urlencoded', *************** *** 131,137 **** } # }}} ! { # simple head {{{ - my $head_request = HEAD 'http://localhost/foo.mhtml'; --- 136,142 ---- } # }}} ! { # simple head {{{ ! my $head_request = HEAD 'http://localhost/foo.mhtml'; *************** *** 146,150 **** my $req = shift @$data; ! is(ref $req, 'HTTP::Request', 'simple head: get() returns HTTP::Request object'); --- 151,155 ---- my $req = shift @$data; ! is(ref $req, 'HTTP::Request', 'simple head: get() returns HTTP::Request object'); *************** *** 158,163 **** } # }}} ! SKIP: { # simple put {{{ ! skip "PUT not supported yet.", 7; my $put_request = PUT 'http://localhost/foo.mhtml'; --- 163,168 ---- } # }}} ! SKIP: { # simple put {{{ ! skip "PUT not supported yet.", 7; my $put_request = PUT 'http://localhost/foo.mhtml'; *************** *** 173,177 **** my $req = shift @$data; ! is(ref $req, 'HTTP::Request', 'simple put: get() returns HTTP::Request object'); --- 178,182 ---- my $req = shift @$data; ! is(ref $req, 'HTTP::Request', 'simple put: get() returns HTTP::Request object'); *************** *** 185,192 **** } # }}} ! { # multipart form data post {{{ ! my $request = POST 'http://localhost/foo.mhtml', Content_Type => 'form-data', ! content => [ 'I' => 'like', 'tasty' => 'pie', file => [ 't/19_filterchange.t' ] ]; --- 190,197 ---- } # }}} ! { # multipart form data post {{{ ! my $request = POST 'http://localhost/foo.mhtml', Content_Type => 'form-data', ! content => [ 'I' => 'like', 'tasty' => 'pie', file => [ 't/19_filterchange.t' ] ]; *************** *** 203,207 **** my $req = shift @$data; ! is(ref $req, 'HTTP::Request', 'multipart form data: get() returns HTTP::Request object'); --- 208,212 ---- my $req = shift @$data; ! is(ref $req, 'HTTP::Request', 'multipart form data: get() returns HTTP::Request object'); *************** *** 227,231 **** ok(1); } ! } } # }}} --- 232,236 ---- ok(1); } ! } } # }}} |