geoff 2003/10/15 05:38:36
Modified: t/modperl status.t t/response/TestModperl status.pm Log: add undef test add harmless notes to error_log for string returns Revision Changes Path 1.2 +10 -1 modperl-2.0/t/modperl/status.t Index: status.t =================================================================== RCS file: /home/cvs/modperl-2.0/t/modperl/status.t,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- status.t 9 Oct 2003 18:40:31 -0000 1.1 +++ status.t 15 Oct 2003 12:38:36 -0000 1.2 @@ -10,7 +10,7 @@ NOT_FOUND SERVER_ERROR FORBIDDEN HTTP_OK); -plan tests => 13; +plan tests => 14; my $base = "/TestModperl__status"; @@ -133,6 +133,15 @@ { my $uri = join '?', $base, 'foo9bar'; + my $code = GET_RC $uri; + + ok t_cmp(Apache::HTTP_OK, + $code, + $uri); +} + +{ + my $uri = join '?', $base, 'undef'; my $code = GET_RC $uri; ok t_cmp(Apache::HTTP_OK, 1.2 +5 -2 modperl-2.0/t/response/TestModperl/status.pm Index: status.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/response/TestModperl/status.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- status.pm 9 Oct 2003 18:40:31 -0000 1.1 +++ status.pm 15 Oct 2003 12:38:36 -0000 1.2 @@ -14,13 +14,16 @@ my $rc = shift->args; if ($rc eq 'die' || - $rc eq Apache::DECLINED) { + $rc eq Apache::DECLINED || + $rc =~ m/foo/) { t_server_log_error_is_expected(); } ModPerl::Util::exit if $rc eq 'exit'; - die if $rc eq 'die'; + die if $rc eq 'die'; + + return if $rc eq 'undef'; return $rc; }