randyk 2004/07/09 09:02:43
Modified: t/hooks cleanup.t cleanup2.t push_handlers.t
stacked_handlers.t stacked_handlers2.t startup.t
t/hooks/TestHooks push_handlers_same_phase.pm
Log:
swap args to t_cmp in t/hooks tests to use new
($received, $expected, $comment) syntax.
Revision Changes Path
1.5 +2 -2 modperl-2.0/t/hooks/cleanup.t
Index: cleanup.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/hooks/cleanup.t,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- cleanup.t 9 Mar 2004 20:46:13 -0000 1.4
+++ cleanup.t 9 Jul 2004 16:02:43 -0000 1.5
@@ -20,7 +20,7 @@
my $location = "/TestHooks__cleanup";
my $expected = 'ok';
my $received = GET_BODY $location;
- ok t_cmp($expected, $received, "register req cleanup");
+ ok t_cmp($received, $expected, "register req cleanup");
}
{
@@ -42,7 +42,7 @@
my $received = <$fh> || '';
close $fh;
my $expected = "cleanup ok";
- ok t_cmp($expected, $received, "verify req cleanup execution");
+ ok t_cmp($received, $expected, "verify req cleanup execution");
# XXX: while Apache::TestUtil fails to cleanup by itself
unlink $file;
1.4 +1 -1 modperl-2.0/t/hooks/cleanup2.t
Index: cleanup2.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/hooks/cleanup2.t,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- cleanup2.t 6 Jun 2003 04:23:46 -0000 1.3
+++ cleanup2.t 9 Jul 2004 16:02:43 -0000 1.4
@@ -25,7 +25,7 @@
my $location = "/TestHooks__cleanup2";
my $expected = 'cleanup2 is ok';
my $received = GET_BODY $location;
- ok t_cmp($expected, $received, "register req cleanup");
+ ok t_cmp($received, $expected, "register req cleanup");
}
{
1.6 +1 -1 modperl-2.0/t/hooks/push_handlers.t
Index: push_handlers.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/hooks/push_handlers.t,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- push_handlers.t 14 Feb 2004 23:22:07 -0000 1.5
+++ push_handlers.t 9 Jul 2004 16:02:43 -0000 1.6
@@ -17,4 +17,4 @@
my $expected = join "\n", @strings, '';
my $received = GET_BODY $location;
-ok t_cmp($expected, $received, "push_handlers ways");
+ok t_cmp($received, $expected, "push_handlers ways");
1.3 +1 -1 modperl-2.0/t/hooks/stacked_handlers.t
Index: stacked_handlers.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/hooks/stacked_handlers.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- stacked_handlers.t 18 Apr 2003 06:18:57 -0000 1.2
+++ stacked_handlers.t 9 Jul 2004 16:02:43 -0000 1.3
@@ -11,4 +11,4 @@
my $expected = join "\n", qw(one two three), '';
my $received = GET_BODY $location;
-ok t_cmp($expected, $received, "stacked_handlers");
+ok t_cmp($received, $expected, "stacked_handlers");
1.3 +1 -1 modperl-2.0/t/hooks/stacked_handlers2.t
Index: stacked_handlers2.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/hooks/stacked_handlers2.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- stacked_handlers2.t 14 Oct 2003 17:32:40 -0000 1.2
+++ stacked_handlers2.t 9 Jul 2004 16:02:43 -0000 1.3
@@ -32,4 +32,4 @@
chomp(my $received = GET_BODY_ASSERT $location);
-ok t_cmp($expected, $received, "stacked_handlers");
+ok t_cmp($received, $expected, "stacked_handlers");
1.2 +2 -2 modperl-2.0/t/hooks/startup.t
Index: startup.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/hooks/startup.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- startup.t 23 Dec 2003 00:31:03 -0000 1.1
+++ startup.t 9 Jul 2004 16:02:43 -0000 1.2
@@ -21,8 +21,8 @@
my $hostport = Apache::TestRequest::hostport($config);
t_debug("connecting to $hostport");
- ok t_cmp($expected,
- GET_BODY_ASSERT("http://$hostport/$path"),
+ ok t_cmp(GET_BODY_ASSERT("http://$hostport/$path"),
+ $expected,
"testing PostConfig");
}
1.3 +3 -3 modperl-2.0/t/hooks/TestHooks/push_handlers_same_phase.pm
Index: push_handlers_same_phase.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/hooks/TestHooks/push_handlers_same_phase.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- push_handlers_same_phase.pm 3 Jul 2004 18:45:46 -0000 1.2
+++ push_handlers_same_phase.pm 9 Jul 2004 16:02:43 -0000 1.3
@@ -38,12 +38,12 @@
# longer happen as we don't allow switching 'perl-script' <=>
# 'modperl' on the go, but test anyway)
my $counter = $r->notes->get('counter') || 0;
- ok t_cmp(1, $counter,
+ ok t_cmp($counter, 1,
__PACKAGE__ . "::handler must have been called only once");
my @handlers = @{ $r->get_handlers('PerlResponseHandler') || []};
- ok t_cmp(2,
- scalar(@handlers),
+ ok t_cmp(scalar(@handlers),
+ 2,
"there should be 2 response handlers");
# once running inside the response phase it shouldn't be possible