dougm       01/12/19 19:54:41

  Modified:    t/apache cgihandler.t compat.t post.t scanhdrs.t
               t/api    send_fd.t sendfile.t
               t/directive perlrequire.t
               t/filter input_body.t input_msg.t lc.t
               t/hooks  access.t trans.t
               t/modperl getc.t readline.t sameinterp.t
  Log:
  enable a bunch of tests when lwp isn't installed now that fallback is more robust
  make a few adjustments for tests to work with and without lwp
  
  Revision  Changes    Path
  1.2       +1 -1      modperl-2.0/t/apache/cgihandler.t
  
  Index: cgihandler.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/apache/cgihandler.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- cgihandler.t      2001/05/05 22:08:45     1.1
  +++ cgihandler.t      2001/12/20 03:54:40     1.2
  @@ -4,7 +4,7 @@
   use Apache::Test;
   use Apache::TestRequest;
   
  -plan tests => 2, \&have_lwp;
  +plan tests => 2;
   
   my $location = "/TestApache::cgihandler";
   my $str;
  
  
  
  1.9       +3 -2      modperl-2.0/t/apache/compat.t
  
  Index: compat.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/apache/compat.t,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- compat.t  2001/12/14 04:52:45     1.8
  +++ compat.t  2001/12/20 03:54:40     1.9
  @@ -6,7 +6,7 @@
   use Apache::TestUtil;
   use Apache::TestRequest;
   
  -plan tests => 31, todo => [25, 28, 30], \&have_lwp;
  +plan tests => 31, todo => [25, 28, 30];
   
   my $location = "/TestApache::compat";
   
  @@ -23,9 +23,10 @@
   # $r->content
   {
       my @data = (test => 'content');
  +    my $content = join '=', @data;
       ok t_cmp(
           "@data",
  -        POST_BODY($location, \@data),
  +        POST_BODY($location, content => $content),
           q{$r->content via POST}
           );
   }
  
  
  
  1.3       +2 -2      modperl-2.0/t/apache/post.t
  
  Index: post.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/apache/post.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- post.t    2001/04/04 04:37:00     1.2
  +++ post.t    2001/12/20 03:54:40     1.3
  @@ -4,7 +4,7 @@
   use Apache::Test;
   use Apache::TestRequest;
   
  -plan tests => 2, \&have_lwp;
  +plan tests => 2;
   
   my $location = "/TestApache::post";
   my $str;
  @@ -12,7 +12,7 @@
   my @data = (arizona => 'wildcats');
   my %data = @data;
   
  -$str = POST_BODY $location, \@data;
  +$str = POST_BODY $location, content => "@data";
   
   ok $str;
   
  
  
  
  1.2       +2 -2      modperl-2.0/t/apache/scanhdrs.t
  
  Index: scanhdrs.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/apache/scanhdrs.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- scanhdrs.t        2001/05/08 21:08:40     1.1
  +++ scanhdrs.t        2001/12/20 03:54:40     1.2
  @@ -4,7 +4,7 @@
   use Apache::Test;
   use Apache::TestRequest;
   
  -plan tests => 4, \&have_lwp;
  +plan tests => 4;
   
   my $module = 'TestApache::scanhdrs';
   my $location = "/$module";
  @@ -13,7 +13,7 @@
   
   ok $res->content eq "1..1\nok 1\n";
   
  -ok $res->header('Content-type') eq 'text/test-output';
  +ok $res->header('Content-Type') eq 'text/test-output';
   
   ok $res->header('X-Perl-Module') eq $module;
   
  
  
  
  1.3       +3 -2      modperl-2.0/t/api/send_fd.t
  
  Index: send_fd.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/api/send_fd.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- send_fd.t 2001/10/02 13:30:31     1.2
  +++ send_fd.t 2001/12/20 03:54:41     1.3
  @@ -3,6 +3,7 @@
   
   use Test;
   use Apache::Test ();
  +use Apache::TestRequest;
   
   plan tests => 3;
   
  @@ -10,7 +11,7 @@
   
   my $url = '/TestAPI::send_fd';
   
  -my $data = $config->http_raw_get($url);
  +my $data = GET_BODY($url);
   
   ok $data;
   
  @@ -18,6 +19,6 @@
   
   ok length($data) == -s $module;
   
  -$data = $config->http_raw_get("$url?noexist.txt");
  +$data = GET_BODY("$url?noexist.txt");
   
   ok $data =~ /Not Found/;
  
  
  
  1.3       +3 -2      modperl-2.0/t/api/sendfile.t
  
  Index: sendfile.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/api/sendfile.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sendfile.t        2001/10/02 13:30:31     1.2
  +++ sendfile.t        2001/12/20 03:54:41     1.3
  @@ -3,6 +3,7 @@
   
   use Test;
   use Apache::Test ();
  +use Apache::TestRequest;
   
   plan tests => 3;
   
  @@ -10,7 +11,7 @@
   
   my $url = '/TestAPI::sendfile';
   
  -my $data = $config->http_raw_get($url);
  +my $data = GET_BODY($url);
   
   ok $data;
   
  @@ -18,6 +19,6 @@
   
   ok length($data) == -s $module;
   
  -$data = $config->http_raw_get("$url?noexist.txt");
  +$data = GET_BODY("$url?noexist.txt");
   
   ok $data =~ /Not Found/;
  
  
  
  1.4       +2 -2      modperl-2.0/t/directive/perlrequire.t
  
  Index: perlrequire.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/directive/perlrequire.t,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- perlrequire.t     2001/11/20 03:44:42     1.3
  +++ perlrequire.t     2001/12/20 03:54:41     1.4
  @@ -6,7 +6,7 @@
   
   use Apache::Test;
   use Apache::TestUtil;
  -use Apache::TestRequest ();
  +use Apache::TestRequest;
   
   my %checks = (
       'default'                    => 'PerlRequired by Parent',
  @@ -25,6 +25,6 @@
       t_debug("connecting to $hostport");
   
       ok t_cmp($checks{$module},
  -             $config->http_raw_get("/TestDirective::perlrequire", undef),
  +             GET_BODY("/TestDirective::perlrequire"),
                "testing PerlRequire in $module");
   }
  
  
  
  1.4       +1 -1      modperl-2.0/t/filter/input_body.t
  
  Index: input_body.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/filter/input_body.t,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- input_body.t      2001/11/06 00:08:10     1.3
  +++ input_body.t      2001/12/20 03:54:41     1.4
  @@ -5,7 +5,7 @@
   use Apache::TestRequest;
   
   #XXX: skip input_body filter test until filter changes dust settles
  -plan tests => 2, \&have_lwp;
  +plan tests => 2;
   
   my $location = '/TestFilter::input_body';
   
  
  
  
  1.6       +2 -2      modperl-2.0/t/filter/input_msg.t
  
  Index: input_msg.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/filter/input_msg.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- input_msg.t       2001/11/20 03:44:43     1.5
  +++ input_msg.t       2001/12/20 03:54:41     1.6
  @@ -1,4 +1,4 @@
  -use Apache::TestRequest ();
  +use Apache::TestRequest;
   use Apache::Test ();
   use Apache::TestUtil;
   
  @@ -11,4 +11,4 @@
   my $hostport = Apache::TestRequest::hostport($config);
   t_debug("connecting to $hostport");
   
  -print $config->http_raw_get("/input_filter.html");
  +print GET_BODY("/input_filter.html");
  
  
  
  1.4       +1 -1      modperl-2.0/t/filter/lc.t
  
  Index: lc.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/filter/lc.t,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- lc.t      2001/09/17 13:27:14     1.3
  +++ lc.t      2001/12/20 03:54:41     1.4
  @@ -4,7 +4,7 @@
   use Apache::Test;
   use Apache::TestRequest;
   
  -plan tests => 1, \&have_lwp;
  +plan tests => 1;
   
   my $location = "/top_dir/Makefile";
   
  
  
  
  1.2       +1 -1      modperl-2.0/t/hooks/access.t
  
  Index: access.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/hooks/access.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- access.t  2001/04/13 01:35:15     1.1
  +++ access.t  2001/12/20 03:54:41     1.2
  @@ -4,7 +4,7 @@
   use Apache::Test;
   use Apache::TestRequest;
   
  -plan tests => 4, \&have_lwp;
  +plan tests => 4;
   
   my $location = "/TestHooks::access";
   
  
  
  
  1.2       +1 -1      modperl-2.0/t/hooks/trans.t
  
  Index: trans.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/hooks/trans.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- trans.t   2001/04/13 02:05:57     1.1
  +++ trans.t   2001/12/20 03:54:41     1.2
  @@ -5,7 +5,7 @@
   use Apache::TestRequest;
   use Apache::Const ':common';
   
  -plan tests => 3, \&have_lwp;
  +plan tests => 3;
   
   ok GET_RC('/nope') == NOT_FOUND;
   
  
  
  
  1.2       +1 -1      modperl-2.0/t/modperl/getc.t
  
  Index: getc.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/modperl/getc.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- getc.t    2001/11/07 04:04:14     1.1
  +++ getc.t    2001/12/20 03:54:41     1.2
  @@ -5,7 +5,7 @@
   use Apache::TestRequest;
   use Apache::TestUtil;
   
  -plan tests => 2, \&have_lwp;
  +plan tests => 2;
   
   my $location = "/TestModperl::getc";
   
  
  
  
  1.2       +1 -1      modperl-2.0/t/modperl/readline.t
  
  Index: readline.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/modperl/readline.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- readline.t        2001/11/08 03:19:47     1.1
  +++ readline.t        2001/12/20 03:54:41     1.2
  @@ -5,7 +5,7 @@
   use Apache::TestRequest;
   use Apache::TestUtil;
   
  -plan tests => 2, \&have_lwp;
  +plan tests => 2;
   
   my $location = "/TestModperl::readline";
   
  
  
  
  1.2       +4 -3      modperl-2.0/t/modperl/sameinterp.t
  
  Index: sameinterp.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/modperl/sameinterp.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sameinterp.t      2001/10/20 03:44:26     1.1
  +++ sameinterp.t      2001/12/20 03:54:41     1.2
  @@ -8,7 +8,7 @@
   use Apache::TestUtil;
   use Apache::TestRequest;
   
  -plan tests => 12, \&have_lwp;
  +plan tests => 12;
   
   my $url = "/TestModperl::sameinterp";
   
  @@ -38,9 +38,10 @@
       my $value = 1;
       for (1..2) {
           $value++;
  +        my $content = join ' ', 'ok', $_ + 3;
           my $res = Apache::TestRequest::same_interp_do($same_interp, \&POST,
  -                                                      $url, [ok => $_+3],
  -                                                      content => "foo");
  +                                                      $url,
  +                                                      content => $content);
           ok t_cmp(
               $value,
               defined $res && $res->content,
  
  
  


Reply via email to