You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-cvs@httpd.apache.org by jo...@apache.org on 2003/06/17 14:47:03 UTC

cvs commit: httpd-apreq-2/glue/perl/t/response/TestApReq inherit.pm

joes        2003/06/17 05:47:03

  Modified:    glue/perl/t/apreq inherit.t
               glue/perl/t/response/TestApReq inherit.pm
  Log:
  Separate inheritance tests and add object cleanup check.
  
  Revision  Changes    Path
  1.6       +6 -5      httpd-apreq-2/glue/perl/t/apreq/inherit.t
  
  Index: inherit.t
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/glue/perl/t/apreq/inherit.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- inherit.t	17 Jun 2003 11:33:43 -0000	1.5
  +++ inherit.t	17 Jun 2003 12:47:03 -0000	1.6
  @@ -6,9 +6,10 @@
   use Apache::TestUtil;
   use Apache::TestRequest qw(GET_BODY UPLOAD_BODY);
   
  -plan tests => 1;
  +plan tests => 4;
   my $location = "/TestApReq__inherit";
  -ok t_cmp(<< 'VALUE', GET_BODY($location, Cookie=>"apache=2"), "inheritance");
  -method => GET
  -cookie => apache=2
  -VALUE
  +my @response = split/\r?\n/, GET_BODY($location, Cookie=>"apache=2");
  +ok t_cmp("method => GET", $response[0], "inherit method");
  +ok t_cmp("cookie => apache=2", $response[1], "inherit cookie");
  +ok t_cmp("DESTROYING TestApReq::inherit object", $response[2], "first object cleanup");
  +ok t_cmp("DESTROYING TestApReq::inherit object", $response[3], "second object cleanup");
  
  
  
  1.4       +2 -0      httpd-apreq-2/glue/perl/t/response/TestApReq/inherit.pm
  
  Index: inherit.pm
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/glue/perl/t/response/TestApReq/inherit.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- inherit.pm	17 Jun 2003 11:23:08 -0000	1.3
  +++ inherit.pm	17 Jun 2003 12:47:03 -0000	1.4
  @@ -20,4 +20,6 @@
       return 0;
   }
   
  +sub DESTROY { $_[0]->print("DESTROYING ", __PACKAGE__, " object\n") }
  +
   1;