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/TestAPI module.pm
Date Wed, 25 Aug 2004 21:35:41 GMT
stas        2004/08/25 14:35:41

  Modified:    t/response/TestAPI module.pm
  Log:
  exercise the fixed loaded() function for perl modules
  
  Revision  Changes    Path
  1.18      +15 -6     modperl-2.0/t/response/TestAPI/module.pm
  
  Index: module.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/module.pm,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -u -r1.17 -r1.18
  --- module.pm	19 Aug 2004 17:55:57 -0000	1.17
  +++ module.pm	25 Aug 2004 21:35:41 -0000	1.18
  @@ -1,4 +1,3 @@
  -
   package TestAPI::module;
   
   use strict;
  @@ -26,7 +25,7 @@
           $module_count++;
       }
   
  -    my $tests = 10 + ( 5 * $module_count );
  +    my $tests = 12 + ( 5 * $module_count );
   
       plan $r, tests => $tests;
   
  @@ -52,11 +51,21 @@
                "Apache::Module::loaded('Apache__Module_foo.so')");
   
       #perl
  -    ok t_cmp(Apache::Module::loaded('Apache::Module'), 1,
  -             "Apache::Module::loaded('Apache::Module')");
  +    {
  +        ok t_cmp(Apache::Module::loaded('Apache::Module'), 1,
  +                 "Apache::Module::loaded('Apache::Module')");
   
  -    ok t_cmp(Apache::Module::loaded('Apache__Module_foo'), 0,
  -             "Apache::Module::loaded('Apache__Module_foo')");
  +        ok t_cmp(Apache::Module::loaded('Apache__Module_foo'), 0,
  +                 "Apache::Module::loaded('Apache__Module_foo')");
  +
  +        # TestAPI::module::foo wasn't loaded but the stash exists
  +        $TestAPI::module::foo::test = 1;
  +        ok !Apache::Module::loaded("TestAPI::module::foo");
  +
  +        # module TestAPI wasn't loaded but the stash exists, since
  +        # TestAPI::module was loaded
  +        ok !Apache::Module::loaded("TestAPI");
  +    }
   
       #bogus
       ok t_cmp(Apache::Module::loaded('Apache__Module_foo.foo'), 0,
  
  
  

Mime
View raw message