perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran...@apache.org
Subject cvs commit: modperl-2.0/ModPerl-Registry/t 206.t 304.t 404.t 500.t bad_scripts.t basic.t bin_resp.t closure.t flush.t nph.t perlrun_extload.t redirect.t special_blocks.t
Date Sun, 11 Jul 2004 04:29:27 GMT
randyk      2004/07/10 21:29:27

  Modified:    ModPerl-Registry/t 206.t 304.t 404.t 500.t bad_scripts.t
                        basic.t bin_resp.t closure.t flush.t nph.t
                        perlrun_extload.t redirect.t special_blocks.t
  Log:
  swap order of args to t_cmp in ModPerl-Registry/t tests to use new
  ($received, $expected, $comment) syntax.
  
  Revision  Changes    Path
  1.2       +2 -2      modperl-2.0/ModPerl-Registry/t/206.t
  
  Index: 206.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/206.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- 206.t	5 Feb 2003 04:10:05 -0000	1.1
  +++ 206.t	11 Jul 2004 04:29:26 -0000	1.2
  @@ -12,13 +12,13 @@
   my $body = '<?xml versi';
   
   ok t_cmp(
  -    206,
       $res->code,
  +    206,
       "test partial_content: response code",
   );
   
   ok t_cmp(
  -    $body,
       $res->content,
  +    $body,
       "test partial_content: response body",
   );
  
  
  
  1.3       +4 -4      modperl-2.0/ModPerl-Registry/t/304.t
  
  Index: 304.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/304.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- 304.t	14 Aug 2003 03:52:03 -0000	1.2
  +++ 304.t	11 Jul 2004 04:29:26 -0000	1.3
  @@ -15,14 +15,14 @@
       my $res = GET($url, 'If-Modified-Since' => $if_modified_since);
   
       ok t_cmp(
  -        304,
           $res->code,
  +        304,
           "test HTTP_NOT_MODIFIED (304 status)",
       );
   
       ok t_cmp(
  -        '',
           $res->content,
  +        '',
           "test HTTP_NOT_MODIFIED (null body)",
       );
   
  @@ -46,14 +46,14 @@
           my $res = GET($url, 'If-Modified-Since' => $if_modified_since);
           t_debug "If-Modified-Since $if_modified_since";
           ok t_cmp(
  -            200,
               $res->code,
  +            200,
               "$debug (code)"
           );
   
           ok t_cmp(
  -            $received,
               $res->content,
  +            $received,
               "$debug (body)"
           );
   
  
  
  
  1.5       +2 -2      modperl-2.0/ModPerl-Registry/t/404.t
  
  Index: 404.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/404.t,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- 404.t	1 Apr 2003 04:22:55 -0000	1.4
  +++ 404.t	11 Jul 2004 04:29:26 -0000	1.5
  @@ -12,8 +12,8 @@
       my $url = "/error_document/cannot_be_found";
       my $response = "Oops, can't find the requested doc";
       ok t_cmp(
  -        $response,
           GET_BODY($url),
  +        $response,
           "test ErrorDocument"
       );
   }
  @@ -23,8 +23,8 @@
       my $url = "/registry/status_change.pl";
       my $res = GET($url);
       ok t_cmp(
  -        404,
           $res->code,
  +        404,
           "the script has changed the status to 404"
       );
   }
  
  
  
  1.11      +6 -6      modperl-2.0/ModPerl-Registry/t/500.t
  
  Index: 500.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/500.t,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- 500.t	3 Jul 2004 18:45:45 -0000	1.10
  +++ 500.t	11 Jul 2004 04:29:26 -0000	1.11
  @@ -14,8 +14,8 @@
       my $res = GET($url);
       #t_debug($res->content);
       ok t_cmp(
  -        500,
           $res->code,
  +        500,
           "500 error on runtime error (when the script changes the status)",
          );
   }
  @@ -25,8 +25,8 @@
       my $res = GET($url);
       #t_debug($res->content);
       ok t_cmp(
  -        500,
           $res->code,
  +        500,
           "500 compile time error (syntax error)",
          );
   }
  @@ -36,8 +36,8 @@
       my $res = GET($url);
       #t_debug($res->content);
       ok t_cmp(
  -        500,
           $res->code,
  +        500,
           "500 compile error on use() failure",
          );
   }
  @@ -47,8 +47,8 @@
       my $res = GET($url);
       #t_debug($res->content);
       ok t_cmp(
  -        500,
           $res->code,
  +        500,
           "500 error on missing HTTP headers",
          );
   }
  @@ -62,8 +62,8 @@
       my $res = GET($url);
       #t_debug($res->content);
       ok t_cmp(
  -        500,
           $res->code,
  +        500,
           "500 error on runtime error",
          );
   }
  @@ -77,8 +77,8 @@
       my $res = GET($url);
       #t_debug($res->content);
       ok t_cmp(
  -        200,
           $res->code,
  +        200,
           "200, followed by a runtime error",
          );
   
  
  
  
  1.4       +1 -1      modperl-2.0/ModPerl-Registry/t/bad_scripts.t
  
  Index: bad_scripts.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/bad_scripts.t,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- bad_scripts.t	8 Mar 2004 08:09:44 -0000	1.3
  +++ bad_scripts.t	11 Jul 2004 04:29:26 -0000	1.4
  @@ -12,8 +12,8 @@
       my $url = "/perlrun/r_inherited.pl";
       my $res = GET($url);
       ok t_cmp(
  -        500,
           $res->code,
  +        500,
           "the script hasn't declared its private \$r",
          );
   }
  
  
  
  1.18      +8 -8      modperl-2.0/ModPerl-Registry/t/basic.t
  
  Index: basic.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/basic.t,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- basic.t	10 Mar 2004 22:59:09 -0000	1.17
  +++ basic.t	11 Jul 2004 04:29:26 -0000	1.18
  @@ -26,8 +26,8 @@
       my $url = "/$alias/basic.pl";
   
       ok t_cmp(
  -        "ok $script_file",
           GET_BODY($url),
  +        "ok $script_file",
           "$modules{$alias} basic cgi test",
       );
   }
  @@ -42,8 +42,8 @@
   
       t_client_log_error_is_expected();
       ok t_cmp(
  -        "403 Forbidden",
           HEAD($url)->status_line(),
  +        "403 Forbidden",
           "$modules{$alias} non-executable file",
       );
   }
  @@ -53,8 +53,8 @@
       my $url = "/$alias/env.pl?foo=bar";
   
       ok t_cmp(
  -        "foo=bar",
           GET_BODY($url),
  +        "foo=bar",
           "$modules{$alias} mod_cgi-like environment pre-set",
       );
   }
  @@ -64,8 +64,8 @@
       my $url = "/$alias/require.pl";
   
       ok t_cmp(
  -        "it works",
           GET_BODY($url),
  +        "it works",
           "$modules{$alias} mod_cgi-like environment pre-set",
       );
   }
  @@ -76,8 +76,8 @@
       my $url = "/$alias/exit.pl";
   
       ok t_cmp(
  -        "before exit",
           GET_BODY_ASSERT($url),
  +        "before exit",
           "$modules{$alias} mod_cgi-like environment pre-set",
       );
   }
  @@ -88,8 +88,8 @@
   {
       my $url = "/registry_oo_conf/env.pl?foo=bar";
       ok t_cmp(
  -        "foo=bar",
           GET_BODY($url),
  +        "foo=bar",
           "ModPerl::Registry->handler mod_cgi-like environment pre-set",
       );
   }
  @@ -98,8 +98,8 @@
   {
       my $url = "/registry/content_type.pl";
       ok t_cmp(
  -        "ok",
           GET_BODY($url),
  +        "ok",
           "\$r->content_type('text/plain')",
       );
   }
  @@ -114,8 +114,8 @@
       my $url = "/registry/send_headers.html";
       my $res = GET $url;
       ok t_cmp(
  -        "text/plain",
           $res->content_type,
  +        "text/plain",
           "script's content-type",
       );
   }
  
  
  
  1.2       +1 -1      modperl-2.0/ModPerl-Registry/t/bin_resp.t
  
  Index: bin_resp.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/bin_resp.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- bin_resp.t	3 Mar 2004 06:03:11 -0000	1.1
  +++ bin_resp.t	11 Jul 2004 04:29:26 -0000	1.2
  @@ -21,7 +21,7 @@
   
       #t_debug "$received";
   
  -    ok t_cmp(length($expected), length($received), "image size");
  +    ok t_cmp(length($received), length($expected), "image size");
   
       t_debug "comparing the binary contents";
       ok $expected eq $received;
  
  
  
  1.12      +6 -6      modperl-2.0/ModPerl-Registry/t/closure.t
  
  Index: closure.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/closure.t,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- closure.t	22 Nov 2003 07:38:48 -0000	1.11
  +++ closure.t	11 Jul 2004 04:29:26 -0000	1.12
  @@ -39,8 +39,8 @@
       my $second = get_body($same_interp, $url);
       skip_not_same_interp(
           (scalar(grep defined, $first, $second) != 2),
  -        0,
           $first && $second && ($second - $first),
  +        0,
           "never the closure problem",
       );
   
  @@ -51,8 +51,8 @@
       my $third = get_body($same_interp, $url);
       skip_not_same_interp(
           (scalar(grep defined, $first, $second, $third) != 3),
  -        1,
           $third,
  +        1,
           "never the closure problem",
       );
   }
  @@ -71,8 +71,8 @@
       my $second = get_body($same_interp, $url);
       skip_not_same_interp(
           (scalar(grep defined, $first, $second) != 2),
  -        1,
           $first && $second && ($second - $first),
  +        1,
           "the closure problem should exist",
       );
   
  @@ -83,8 +83,8 @@
       my $third = get_body($same_interp, $url);
       skip_not_same_interp(
           (scalar(grep defined, $first, $second, $third) != 3),
  -        1,
           $third,
  +        1,
           "no closure on the first request",
       );
   }
  @@ -103,8 +103,8 @@
       my $second = get_body($same_interp, $url);
       skip_not_same_interp(
           (scalar(grep defined, $first, $second) != 2),
  -        1,
           $first && $second && ($second - $first),
  +        1,
           "the closure problem should exist",
       );
   
  @@ -115,8 +115,8 @@
       my $third = get_body($same_interp, $url);
       skip_not_same_interp(
           (scalar(grep defined, $first, $second, $third) != 3),
  -        1,
           $first && $second && $third - $second,
  +        1,
           "no reload on modification, the closure problem persists",
       );
   }
  
  
  
  1.4       +1 -1      modperl-2.0/ModPerl-Registry/t/flush.t
  
  Index: flush.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/flush.t,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- flush.t	20 Aug 2003 22:58:17 -0000	1.3
  +++ flush.t	11 Jul 2004 04:29:26 -0000	1.4
  @@ -20,8 +20,8 @@
   my $decompressed = Compress::Zlib::memGunzip($received);
   
   ok t_cmp(
  -    $expected,
       $decompressed,
  +    $expected,
       "test flush body"
      );
   
  
  
  
  1.2       +2 -2      modperl-2.0/ModPerl-Registry/t/nph.t
  
  Index: nph.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/nph.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- nph.t	25 Jan 2004 01:04:16 -0000	1.1
  +++ nph.t	11 Jul 2004 04:29:26 -0000	1.2
  @@ -34,16 +34,16 @@
       if ($key eq 'headers') {
           for my $header (keys %$expected) {
               ok t_cmp(
  -                $expected->{$header},
                   $received->{$header},
  +                $expected->{$header},
                   "test header $header"
               );
           }
       }
       else {
           ok t_cmp(
  -            $expected,
               $received,
  +            $expected,
               "test key: $key"
           );
       }
  
  
  
  1.3       +1 -1      modperl-2.0/ModPerl-Registry/t/perlrun_extload.t
  
  Index: perlrun_extload.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/perlrun_extload.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- perlrun_extload.t	2 Apr 2004 02:17:45 -0000	1.2
  +++ perlrun_extload.t	11 Jul 2004 04:29:26 -0000	1.3
  @@ -15,8 +15,8 @@
       my $res = get_body($same_interp, $url);
       skip_not_same_interp(
           !defined($res),
  -        "d1nd1234",
           $res,
  +        "d1nd1234",
           "PerlRun requiring an external lib with subs",
       );
   }
  
  
  
  1.8       +4 -4      modperl-2.0/ModPerl-Registry/t/redirect.t
  
  Index: redirect.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/redirect.t,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- redirect.t	4 Dec 2003 07:20:29 -0000	1.7
  +++ redirect.t	11 Jul 2004 04:29:26 -0000	1.8
  @@ -19,8 +19,8 @@
       my $script_file = t_catfile_apache $vars->{serverroot}, 'cgi-bin', 'basic.pl';
   
       ok t_cmp(
  -        "ok $script_file",
           GET_BODY($url),
  +        "ok $script_file",
           "test redirect: existing target",
          );
   }
  @@ -30,8 +30,8 @@
       my $url = "$base_url?$redirect_path";
       t_client_log_error_is_expected();
       ok t_cmp(
  -        404,
           HEAD($url)->code,
  +        404,
           "test redirect: non-existing target",
          );
   }
  @@ -46,14 +46,14 @@
       my $response = HEAD $url;
   
       ok t_cmp(
  -        302,
           $response->code,
  +        302,
           "test Registry style redirect: status",
          );
   
       ok t_cmp(
  -        "mod_perl=ubercool; path=/",
           $response->header('Set-Cookie'),
  +        "mod_perl=ubercool; path=/",
           "test Registry style redirect: cookie",
          );
   }
  
  
  
  1.10      +8 -8      modperl-2.0/ModPerl-Registry/t/special_blocks.t
  
  Index: special_blocks.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/special_blocks.t,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- special_blocks.t	2 Apr 2004 02:17:45 -0000	1.9
  +++ special_blocks.t	11 Jul 2004 04:29:26 -0000	1.10
  @@ -35,8 +35,8 @@
       $skip++ unless defined $res;
       skip_not_same_interp(
           $skip,
  -        "begin ok",
           $res,
  +        "begin ok",
           "$modules{$alias} is running BEGIN blocks on the first request",
       );
   
  @@ -44,8 +44,8 @@
       $skip++ unless defined $res;
       skip_not_same_interp(
           $skip,
  -        "begin ok",
           $res,
  +        "begin ok",
           "$modules{$alias} is running BEGIN blocks on the second request",
       );
   
  @@ -53,8 +53,8 @@
       $skip++ unless defined $res;
       skip_not_same_interp(
           $skip,
  -        "end ok",
           $res,
  +        "end ok",
           "$modules{$alias} is running END blocks on the third request",
       );
   
  @@ -62,8 +62,8 @@
       $skip++ unless defined $res;
       skip_not_same_interp(
           $skip,
  -        "end ok",
           $res,
  +        "end ok",
           "$modules{$alias} is running END blocks on the fourth request",
       );
   }
  @@ -89,8 +89,8 @@
       $skip++ unless defined $res;
       skip_not_same_interp(
           $skip,
  -        "begin ok",
           $res,
  +        "begin ok",
           "$modules{$alias} is running BEGIN blocks on the first request",
       );
   
  @@ -99,8 +99,8 @@
       t_debug($res);
       skip_not_same_interp(
           $skip,
  -        "",
           $res,
  +        "",
           "$modules{$alias} is not running BEGIN blocks on the second request",
       );
   
  @@ -115,8 +115,8 @@
       $skip++ unless defined $res;
       skip_not_same_interp(
           $skip,
  -        "end ok",
           $res,
  +        "end ok",
           "$modules{$alias} is running END blocks on the first request",
       );
   
  @@ -124,8 +124,8 @@
       $skip++ unless defined $res;
       skip_not_same_interp(
           $skip,
  -        "end ok",
           $res,
  +        "end ok",
           "$modules{$alias} is running END blocks on the second request",
       );
   }
  
  
  

Mime
View raw message