Author: pgollucci Date: Wed Aug 23 00:02:07 2006 New Revision: 433950 URL: http://svn.apache.org/viewvc?rev=433950&view=rev Log: create apache2 dir
Added: perl/Apache-SizeLimit/trunk/t/apache2/ perl/Apache-SizeLimit/trunk/t/apache2/all.t perl/Apache-SizeLimit/trunk/t/apache2/check_n_requests.t perl/Apache-SizeLimit/trunk/t/apache2/check_n_requests2.t Added: perl/Apache-SizeLimit/trunk/t/apache2/all.t URL: http://svn.apache.org/viewvc/perl/Apache-SizeLimit/trunk/t/apache2/all.t?rev=433950&view=auto ============================================================================== --- perl/Apache-SizeLimit/trunk/t/apache2/all.t (added) +++ perl/Apache-SizeLimit/trunk/t/apache2/all.t Wed Aug 23 00:02:07 2006 @@ -0,0 +1,36 @@ +use strict; +use warnings FATAL => 'all'; + +use Config; +use Apache::Test; + +# skip all tests in this directory unless mod_perl is enabled +plan tests => 1, \&my_need; + +ok 1; + +sub my_need { + + my $ok = 1; + + if ( $Config{'osname'} eq 'linux' ) { + $ok = need_module('Linux::Pid'); + if ( -e '/proc/self/smaps' ) { + $ok &= need_module('Linux::Smaps'); + } + } + elsif ( $Config{'osname'} =~ /(bsd|aix)/i ) { + $ok &= need_module('BSD::Resource'); + } + elsif ( $Config{'osname'} eq 'MSWin32' ) { + $ok &= need_module('Win32::API'); + } + + $ok &= need_module('mod_perl.c'); + + $ok &= need_apache(1); + + $ok &= need_min_module_version('Test::Builder' => '0.18_01'); + + return $ok; +} Added: perl/Apache-SizeLimit/trunk/t/apache2/check_n_requests.t URL: http://svn.apache.org/viewvc/perl/Apache-SizeLimit/trunk/t/apache2/check_n_requests.t?rev=433950&view=auto ============================================================================== --- perl/Apache-SizeLimit/trunk/t/apache2/check_n_requests.t (added) +++ perl/Apache-SizeLimit/trunk/t/apache2/check_n_requests.t Wed Aug 23 00:02:07 2006 @@ -0,0 +1,16 @@ +use strict; +use warnings FATAL => 'all'; + +use Apache::Test; +use Apache::TestRequest; + +my $module = 'TestApache::check_n_requests'; +my $url = Apache::TestRequest::module2url($module); + +plan tests => 1, need_min_module_version('Apache::Test' => 1.29); +require Apache::TestUtil; + +Apache::TestUtil::t_start_error_log_watch(); +my $res = GET $url; +my $c = grep { / Apache::SizeLimit httpd process too big/ } Apache::TestUtil::t_finish_error_log_watch(); +ok $c == 1; Added: perl/Apache-SizeLimit/trunk/t/apache2/check_n_requests2.t URL: http://svn.apache.org/viewvc/perl/Apache-SizeLimit/trunk/t/apache2/check_n_requests2.t?rev=433950&view=auto ============================================================================== --- perl/Apache-SizeLimit/trunk/t/apache2/check_n_requests2.t (added) +++ perl/Apache-SizeLimit/trunk/t/apache2/check_n_requests2.t Wed Aug 23 00:02:07 2006 @@ -0,0 +1,16 @@ +use strict; +use warnings FATAL => 'all'; + +use Apache::Test; +use Apache::TestRequest; + +my $module = 'TestApache::check_n_requests2'; +my $url = Apache::TestRequest::module2url($module); + +plan tests => 1, need_min_module_version('Apache::Test' => 1.29); +require Apache::TestUtil; + +Apache::TestUtil::t_start_error_log_watch(); +my $res = GET $url; +my $c = grep { /Apache::SizeLimit httpd process too big/ } Apache::TestUtil::t_finish_error_log_watch(); +ok $c == 0;