stas        2003/01/22 17:12:01

  Modified:    ModPerl-Registry/t/cgi-bin syntax_error.pl
               ModPerl-Registry/t 500.t
               ModPerl-Registry/t/conf modperl_extra_startup.pl
  Added:       ModPerl-Registry/t/cgi-bin runtime_error.pl
  Log:
  - fix the syntax error test to have a real syntax error
  - move the runtime error into a separate test
  
  Revision  Changes    Path
  1.2       +6 -1      modperl-2.0/ModPerl-Registry/t/cgi-bin/syntax_error.pl
  
  Index: syntax_error.pl
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/cgi-bin/syntax_error.pl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- syntax_error.pl   23 Jan 2003 00:33:28 -0000      1.1
  +++ syntax_error.pl   23 Jan 2003 01:12:01 -0000      1.2
  @@ -1,2 +1,7 @@
   print "Content-type: text/plain\n\n";
  -print no_such_func();
  +
  +# the following syntax error is here on purpose!
  +
  +lkj;\;
  +
  +print "done";
  
  
  
  1.1                  modperl-2.0/ModPerl-Registry/t/cgi-bin/runtime_error.pl
  
  Index: runtime_error.pl
  ===================================================================
  print "Content-type: text/plain\n\n";
  print no_such_func();
  
  
  
  1.2       +14 -3     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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- 500.t     23 Jan 2003 00:33:27 -0000      1.1
  +++ 500.t     23 Jan 2003 01:12:01 -0000      1.2
  @@ -5,13 +5,13 @@
   use Apache::TestUtil;
   use Apache::TestRequest qw(GET);
   
  -plan tests => 2;
  +plan tests => 3;
   
   
   {
       my $url = "/registry/syntax_error.pl";
       my $res = GET($url);
  -    t_debug($res->content);
  +    #t_debug($res->content);
       ok t_cmp(
           500,
           $res->code,
  @@ -20,9 +20,20 @@
   }
   
   {
  +    my $url = "/registry/runtime_error.pl";
  +    my $res = GET($url);
  +    #t_debug($res->content);
  +    ok t_cmp(
  +        500,
  +        $res->code,
  +        "500 error on runtime error",
  +       );
  +}
  +
  +{
       my $url = "/registry/missing_headers.pl";
       my $res = GET($url);
  -    t_debug($res->content);
  +    #t_debug($res->content);
       ok t_cmp(
           500,
           $res->code,
  
  
  
  1.8       +3 -2      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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- modperl_extra_startup.pl  23 Jan 2003 00:38:33 -0000      1.7
  +++ modperl_extra_startup.pl  23 Jan 2003 01:12:01 -0000      1.8
  @@ -34,8 +34,9 @@
           trans   => \&trans,
       );
   
  -    my %skip = map { $_ => 1 } qw(lib.pl perlrun_require.pl 
  -                                  syntax_error.pl missing_headers.pl);
  +    my %skip = map { $_ => 1 } 
  +        qw(lib.pl perlrun_require.pl syntax_error.pl runtime_error.pl
  +           missing_headers.pl);
       my $dh = DirHandle->new($base_dir) or die $!;
       for my $file ($dh->read) {
           next unless $file =~ /\.pl$/;
  
  
  


Reply via email to