stas        2004/08/20 17:41:36

  Modified:    t/response/TestAPR bucket.pm
               t/lib/TestAPRlib bucket.pm
  Log:
  need to destroy removed buckets
  
  Revision  Changes    Path
  1.11      +5 -3      modperl-2.0/t/response/TestAPR/bucket.pm
  
  Index: bucket.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/bucket.pm,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -u -r1.10 -r1.11
  --- bucket.pm 20 Aug 2004 21:11:00 -0000      1.10
  +++ bucket.pm 21 Aug 2004 00:41:36 -0000      1.11
  @@ -93,10 +93,12 @@
           t_debug("not empty");
           ok !$bb->is_empty;
   
  -        # remove all buckets from bb and test that it's empty
  -        for (my $b = $bb->first; $b; $b = $bb->next($b)) {
  -            $b->remove;
  +        # delete all buckets from bb and test that it's empty
  +        while (!$bb->is_empty) {
  +            my $b = $bb->first;
  +            $b->delete;
           }
  +
           t_debug("empty");
           ok $bb->is_empty;
       }
  
  
  
  1.4       +6 -2      modperl-2.0/t/lib/TestAPRlib/bucket.pm
  
  Index: bucket.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/lib/TestAPRlib/bucket.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -u -r1.3 -r1.4
  --- bucket.pm 20 Aug 2004 21:10:43 -0000      1.3
  +++ bucket.pm 21 Aug 2004 00:41:36 -0000      1.4
  @@ -12,7 +12,7 @@
   use APR::BucketType ();
   
   sub num_of_tests {
  -    return 13;
  +    return 14;
   }
   
   sub test {
  @@ -120,12 +120,16 @@
   
       }
   
  -    # remove
  +    # remove/destroy
       {
           my $b = APR::Bucket->new("aaa");
           # remove $b when it's not attached to anything (not sure if
           # that should be an error)
           $b->remove;
  +        ok 1;
  +
  +        # a dangling bucket needs to be destroyed
  +        $b->destroy;
           ok 1;
   
           # real remove from bb is tested in many other filter tests
  
  
  

Reply via email to