perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/ModPerl-Registry/t/cgi-bin status_change.pl
Date Fri, 07 Feb 2003 00:13:40 GMT
stas        2003/02/06 16:13:40

  Modified:    ModPerl-Registry/t 404.t
  Added:       ModPerl-Registry/t/cgi-bin status_change.pl
  Log:
  test that we handle correctly status changes from within the script
  
  Revision  Changes    Path
  1.2       +14 -4     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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- 404.t	24 Dec 2002 01:51:40 -0000	1.1
  +++ 404.t	7 Feb 2003 00:13:40 -0000	1.2
  @@ -3,17 +3,27 @@
   
   use Apache::Test;
   use Apache::TestUtil;
  -use Apache::TestRequest qw(GET_BODY HEAD);
  +use Apache::TestRequest qw(GET_BODY GET);
   
  -plan tests => 1;
  -
  -my $url = "/error_document/cannot_be_found";
  +plan tests => 2;
   
   {
  +    my $url = "/error_document/cannot_be_found";
       my $response = "Oops, can't find the requested doc";
       ok t_cmp(
           $response,
           GET_BODY($url),
           "test ErrorDocument",
  +       );
  +}
  +
  +
  +{
  +    my $url = "/registry/status_change.pl";
  +    my $res = GET($url);
  +    ok t_cmp(
  +        404,
  +        $res->code,
  +        "the script has changed the status to 404",
          );
   }
  
  
  
  1.1                  modperl-2.0/ModPerl-Registry/t/cgi-bin/status_change.pl
  
  Index: status_change.pl
  ===================================================================
  my $r = shift;
  $r->status(404);
  $r->send_http_header('text/plain');
  
  
  

Mime
View raw message