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/t/response/TestAPR finfo.pm
Date Sat, 24 Jul 2004 01:42:42 GMT
stas        2004/07/23 18:42:42

  Modified:    t/lib/TestAPRlib finfo.pm
               t/response/TestAPR finfo.pm
  Log:
  add $r->finfo assignment test
  
  Revision  Changes    Path
  1.2       +5 -4      modperl-2.0/t/lib/TestAPRlib/finfo.pm
  
  Index: finfo.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/lib/TestAPRlib/finfo.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- finfo.pm	15 Jul 2004 15:28:03 -0000	1.1
  +++ finfo.pm	24 Jul 2004 01:42:42 -0000	1.2
  @@ -17,8 +17,9 @@
   
   use APR::Finfo ();
   use APR::Pool ();
  -use APR::Const    -compile => qw(SUCCESS FINFO_NORM REG
  -                                 WREAD WWRITE WEXECUTE);
  +
  +use APR::Const -compile => qw(SUCCESS FINFO_NORM REG
  +                              WREAD WWRITE WEXECUTE);
   
   sub num_of_tests {
       return 15;
  @@ -36,8 +37,8 @@
       # stat tests (same as perl's stat)
       {
           # now, get information from perl's stat()
  -        our ($device, $inode, $protection, $nlink, $user, $group,
  -             undef, $size, $atime, $mtime, $ctime) = stat $file;
  +        our($device, $inode, $protection, $nlink, $user, $group,
  +            undef, $size, $atime, $mtime, $ctime) = stat $file;
   
           # skip certain tests on Win32 and others
           my %skip = ();
  
  
  
  1.14      +12 -1     modperl-2.0/t/response/TestAPR/finfo.pm
  
  Index: finfo.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/finfo.pm,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -u -r1.13 -r1.14
  --- finfo.pm	15 Jul 2004 15:28:03 -0000	1.13
  +++ finfo.pm	24 Jul 2004 01:42:42 -0000	1.14
  @@ -6,16 +6,20 @@
   use Apache::Test;
   use Apache::TestUtil;
   
  +use Apache::RequestRec ();
  +use Apache::RequestIO ();
  +
   use TestAPRlib::finfo;
   
   use APR::Finfo ();
   
   use Apache::Const -compile => 'OK';
  +use APR::Const    -compile => qw(FINFO_NORM);
   
   sub handler {
       my $r = shift;
   
  -    my $tests = 2 + TestAPRlib::finfo::num_of_tests();
  +    my $tests = 3 + TestAPRlib::finfo::num_of_tests();
       plan $r, tests => $tests;
   
       {
  @@ -32,6 +36,13 @@
   
           t_debug "\$r->finfo->pool $pool";
           ok $isa;
  +    }
  +
  +    {
  +        my $finfo = APR::Finfo::stat(__FILE__, APR::FINFO_NORM, $r->pool);
  +        t_debug "\$r->finfo(\$finfo)";
  +        $r->finfo($finfo);
  +        ok $r->finfo->fname;
       }
   
       TestAPRlib::finfo::test();
  
  
  

Mime
View raw message