stas        2003/03/31 19:07:20

  Modified:    ModPerl-Registry/t 500.t
               ModPerl-Registry/t/conf modperl_extra_startup.pl
  Added:       ModPerl-Registry/t/cgi-bin use_error.pl
  Log:
  a sub-test to check the errors on failed use/require
  
  Revision  Changes    Path
  1.1                  modperl-2.0/ModPerl-Registry/t/cgi-bin/use_error.pl
  
  Index: use_error.pl
  ===================================================================
  use DoesNotExist ();
  
  print "Content-type: text/plain\n\n";
  print "this script is expected to fail";
  
  
  
  1.4       +13 -2     modperl-2.0/ModPerl-Registry/t/500.t
  
  Index: 500.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/500.t,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- 500.t     7 Feb 2003 00:15:39 -0000       1.3
  +++ 500.t     1 Apr 2003 03:07:20 -0000       1.4
  @@ -5,7 +5,7 @@
   use Apache::TestUtil;
   use Apache::TestRequest qw(GET);
   
  -plan tests => 6;
  +plan tests => 7;
   
   {
       # the script changes the status before the run-time error happens,
  @@ -29,7 +29,18 @@
       ok t_cmp(
           500,
           $res->code,
  -        "500 error on syntax error",
  +        "500 compile time error (syntax error)",
  +       );
  +}
  +
  +{
  +    my $url = "/registry/use_error.pl";
  +    my $res = GET($url);
  +    #t_debug($res->content);
  +    ok t_cmp(
  +        500,
  +        $res->code,
  +        "500 compile error on use() failure",
          );
   }
   
  
  
  
  1.10      +1 -1      modperl-2.0/ModPerl-Registry/t/conf/modperl_extra_startup.pl
  
  Index: modperl_extra_startup.pl
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/conf/modperl_extra_startup.pl,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- modperl_extra_startup.pl  8 Mar 2003 03:58:59 -0000       1.9
  +++ modperl_extra_startup.pl  1 Apr 2003 03:07:20 -0000       1.10
  @@ -36,7 +36,7 @@
   
       my %skip = map { $_ => 1 } 
           qw(lib.pl perlrun_require.pl syntax_error.pl runtime_error.pl
  -           missing_headers.pl r_inherited.pl);
  +           use_error.pl missing_headers.pl r_inherited.pl);
       my $dh = DirHandle->new($base_dir) or die $!;
       for my $file ($dh->read) {
           next unless $file =~ /\.pl$/;
  
  
  

Reply via email to