perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r417795 - in /perl/Apache-SizeLimit/trunk: Makefile.PL t/apache/all.t t/response/TestApache/basic.pm
Date Wed, 28 Jun 2006 15:38:31 GMT
Author: geoff
Date: Wed Jun 28 08:38:31 2006
New Revision: 417795

URL: http://svn.apache.org/viewvc?rev=417795&view=rev
Log:
migrate basic.pm test to use Apache::Test's
Test::More support so you don't need to mess with
Test::More internals or http headers

Modified:
    perl/Apache-SizeLimit/trunk/Makefile.PL
    perl/Apache-SizeLimit/trunk/t/apache/all.t
    perl/Apache-SizeLimit/trunk/t/response/TestApache/basic.pm

Modified: perl/Apache-SizeLimit/trunk/Makefile.PL
URL: http://svn.apache.org/viewvc/perl/Apache-SizeLimit/trunk/Makefile.PL?rev=417795&r1=417794&r2=417795&view=diff
==============================================================================
--- perl/Apache-SizeLimit/trunk/Makefile.PL (original)
+++ perl/Apache-SizeLimit/trunk/Makefile.PL Wed Jun 28 08:38:31 2006
@@ -66,6 +66,11 @@
 
     my $test = shift->MM::test(@_);
 
+  eval { require Test::More } or return <<EOF;
+test::
+\t\@echo sorry, cannot run tests without Test::More
+EOF
+
     return HAS_APACHE_TEST if HAS_APACHE_TEST;
 
     return $test;

Modified: perl/Apache-SizeLimit/trunk/t/apache/all.t
URL: http://svn.apache.org/viewvc/perl/Apache-SizeLimit/trunk/t/apache/all.t?rev=417795&r1=417794&r2=417795&view=diff
==============================================================================
--- perl/Apache-SizeLimit/trunk/t/apache/all.t (original)
+++ perl/Apache-SizeLimit/trunk/t/apache/all.t Wed Jun 28 08:38:31 2006
@@ -30,5 +30,7 @@
 
     $ok &= need_min_apache_version(1);
 
+    $ok &= need_min_module_version('Test::Builder' => '0.18_01');
+
     return $ok;
 }

Modified: perl/Apache-SizeLimit/trunk/t/response/TestApache/basic.pm
URL: http://svn.apache.org/viewvc/perl/Apache-SizeLimit/trunk/t/response/TestApache/basic.pm?rev=417795&r1=417794&r2=417795&view=diff
==============================================================================
--- perl/Apache-SizeLimit/trunk/t/response/TestApache/basic.pm (original)
+++ perl/Apache-SizeLimit/trunk/t/response/TestApache/basic.pm Wed Jun 28 08:38:31 2006
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More;
+use Apache::Test qw(-withtestmore);
 
 use Apache::Constants qw(OK);
 use Apache::SizeLimit;
@@ -12,13 +12,7 @@
 sub handler {
     my $r = shift;
 
-    Test::Builder->new->output(*STDOUT);
-    Test::Builder->new->failure_output(*STDOUT);
-
-    $r->content_type('text/plain');
-    $r->send_http_header();
-
-    plan tests => 3;
+    plan $r, tests => 3;
 
     Apache::SizeLimit::setmax( 100_000 );
     Apache::SizeLimit::setmin( 1 );



Mime
View raw message