[Apache-dispatch-devel] SF.net SVN: apache-dispatch: [56] trunk
Brought to you by:
geoffrey_young,
phred_moyer
|
From: <phr...@us...> - 2007-08-05 21:04:55
|
Revision: 56
http://apache-dispatch.svn.sourceforge.net/apache-dispatch/?rev=56&view=rev
Author: phred_moyer
Date: 2007-08-05 14:04:57 -0700 (Sun, 05 Aug 2007)
Log Message:
-----------
- correctly use the :withtestmore feature instead of my atrocious hack
- actually commit the version updates for 10_02 (my bad)
- since we are using Test::More, take advantage of like() and cmp_ok()
Modified Paths:
--------------
trunk/Changes
trunk/Makefile.PL
trunk/lib/Apache/Dispatch.pm
trunk/lib/Apache2/Dispatch.pm
trunk/t/01plain.t
trunk/t/02extras.t
trunk/t/03filter.t
trunk/t/04oo.t
Modified: trunk/Changes
===================================================================
--- trunk/Changes 2007-07-20 06:41:37 UTC (rev 55)
+++ trunk/Changes 2007-08-05 21:04:57 UTC (rev 56)
@@ -1,5 +1,9 @@
Revision history for Perl extension Apache::Dispatch
+0.10_03
+ - use the :withtestmore feature correctly
+ - use like() instead of ok( $foo =~ m/bar/ )
+
0.10_02 07.19.2007
- fix the unadvertised feature which allows handling <Location />
Modified: trunk/Makefile.PL
===================================================================
--- trunk/Makefile.PL 2007-07-20 06:41:37 UTC (rev 55)
+++ trunk/Makefile.PL 2007-08-05 21:04:57 UTC (rev 56)
@@ -71,7 +71,7 @@
my %prereq = ();
-my %makefile_params = ( 'VERSION' => '0.10_01', );
+my %makefile_params = ( 'VERSION' => '0.10_02', );
if ( $mp_wanted == 2 ) { # mod_perl2 specific makefile
$prereq{'mod_perl2'} = 1.99023; # this covers the naming change
Modified: trunk/lib/Apache/Dispatch.pm
===================================================================
--- trunk/lib/Apache/Dispatch.pm 2007-07-20 06:41:37 UTC (rev 55)
+++ trunk/lib/Apache/Dispatch.pm 2007-08-05 21:04:57 UTC (rev 56)
@@ -11,7 +11,7 @@
use strict;
use warnings;
-our $VERSION = '0.10_01';
+our $VERSION = '0.10_02';
use mod_perl 1.2401;
use Apache::Constants qw(OK DECLINED SERVER_ERROR);
Modified: trunk/lib/Apache2/Dispatch.pm
===================================================================
--- trunk/lib/Apache2/Dispatch.pm 2007-07-20 06:41:37 UTC (rev 55)
+++ trunk/lib/Apache2/Dispatch.pm 2007-08-05 21:04:57 UTC (rev 56)
@@ -9,7 +9,7 @@
use strict;
use warnings;
-$Apache2::Dispatch::VERSION = '0.10_01';
+$Apache2::Dispatch::VERSION = '0.10_02';
use mod_perl2 1.99023;
use Apache2::Const -compile => qw(OK DECLINED SERVER_ERROR);
Modified: trunk/t/01plain.t
===================================================================
--- trunk/t/01plain.t 2007-07-20 06:41:37 UTC (rev 55)
+++ trunk/t/01plain.t 2007-08-05 21:04:57 UTC (rev 56)
@@ -1,8 +1,9 @@
use strict;
use warnings FATAL => 'all';
-use Apache::Test qw(ok plan :withtestmore );
+use Apache::Test qw( :withtestmore );
use Apache::TestRequest qw(GET GET_OK);
+use Test::More;
plan tests => 5, need_lwp;
Modified: trunk/t/02extras.t
===================================================================
--- trunk/t/02extras.t 2007-07-20 06:41:37 UTC (rev 55)
+++ trunk/t/02extras.t 2007-08-05 21:04:57 UTC (rev 56)
@@ -1,19 +1,20 @@
use strict;
use warnings FATAL => 'all';
-use Apache::Test qw(ok plan :withtestmore );
+use Apache::Test qw( :withtestmore );
use Apache::TestRequest qw(GET);
+use Test::More;
plan tests => 5, need_lwp;
my $uri = '/extras';
my $res = GET $uri;
-ok $res->code == 200;
-ok $res->content =~ m/post_dispatch/;
-ok $res->content =~ m/pre_dispatch/;
+cmp_ok($res->code, '==', 200);
+like($res->content, qr/post_dispatch/);
+like($res->content, qr/pre_dispatch/);
$uri = '/extras/bad';
$res = GET $uri;
-ok $res->code == 200;
-ok $res->content =~ m/Yikes(.*?)dispatch_error/i;
+cmp_ok($res->code, '==', 200);
+like($res->content, qr/Yikes(.*?)dispatch_error/i, 'content like Yikes');
Modified: trunk/t/03filter.t
===================================================================
--- trunk/t/03filter.t 2007-07-20 06:41:37 UTC (rev 55)
+++ trunk/t/03filter.t 2007-08-05 21:04:57 UTC (rev 56)
@@ -1,8 +1,9 @@
use strict;
use warnings FATAL => 'all';
-use Apache::Test qw(ok plan :withtestmore );
+use Apache::Test qw( :withtestmore );
use Apache::TestRequest qw(GET);
+use Test::More;
# figure out what version of apache we have we have
my $httpd = Apache::Test::vars('httpd');
@@ -28,4 +29,4 @@
my $res = GET $url;
ok( $res->is_success );
-ok( $res->content =~ m/dispatchfoo/i );
+like( $res->content, qr/dispatch_foo/i, 'content like dispatch_foo' );
Modified: trunk/t/04oo.t
===================================================================
--- trunk/t/04oo.t 2007-07-20 06:41:37 UTC (rev 55)
+++ trunk/t/04oo.t 2007-08-05 21:04:57 UTC (rev 56)
@@ -1,8 +1,9 @@
use strict;
use warnings FATAL => 'all';
-use Apache::Test qw(ok plan :withtestmore );
+use Apache::Test qw(:withtestmore );
use Apache::TestRequest qw(GET);
+use Test::More;
plan tests => 2, need_lwp;
@@ -10,4 +11,4 @@
my $res = GET $url;
ok($res->is_success);
-ok($res->content =~ m/dispatch_baz/i);
+like($res->content, qr/dispatch_baz/i, 'content like dispatch_baz');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|