stas 2003/01/22 16:33:28 Added: ModPerl-Registry/t 500.t ModPerl-Registry/t/cgi-bin missing_headers.pl syntax_error.pl Log: add tests to verify that 500 is generated on syntax errors and missing headers Revision Changes Path 1.1 modperl-2.0/ModPerl-Registry/t/500.t Index: 500.t =================================================================== use strict; use warnings FATAL => 'all'; use Apache::Test; use Apache::TestUtil; use Apache::TestRequest qw(GET); plan tests => 2; { my $url = "/registry/syntax_error.pl"; my $res = GET($url); t_debug($res->content); ok t_cmp( 500, $res->code, "500 error on syntax error", ); } { my $url = "/registry/missing_headers.pl"; my $res = GET($url); t_debug($res->content); ok t_cmp( 500, $res->code, "500 error on missing HTTP headers", ); } 1.1 modperl-2.0/ModPerl-Registry/t/cgi-bin/missing_headers.pl Index: missing_headers.pl =================================================================== print "No HTTP headers were sent\n\n"; print "Here is some more body coming\n even with double new line\n\n"; print "Here is some more body coming"; 1.1 modperl-2.0/ModPerl-Registry/t/cgi-bin/syntax_error.pl Index: syntax_error.pl =================================================================== print "Content-type: text/plain\n\n"; print no_such_func();