randyk 2004/07/09 08:52:27
Modified: t/filter both_str_con_add.t both_str_req_add.t
both_str_req_mix.t both_str_req_proxy.t
in_autoload.t in_bbs_consume.t
in_bbs_inject_header.t in_bbs_underrun.t in_error.t
in_str_bin_data.t in_str_consume.t in_str_lc.t
in_str_sandwich.t out_bbs_ctx.t out_str_ctx.t
out_str_declined.t out_str_remove.t
out_str_req_eos.t out_str_reverse.t
out_str_subreq_default.t out_str_subreq_modperl.t
t/filter/TestFilter in_str_declined.pm in_str_msg.pm
out_str_api.pm
Log:
swap args to t_cmp in t/filter tests to use new
($received, $expected, $comment) syntax.
Revision Changes Path
1.5 +1 -1 modperl-2.0/t/filter/both_str_con_add.t
Index: both_str_con_add.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/both_str_con_add.t,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- both_str_con_add.t 23 Sep 2003 23:53:58 -0000 1.4
+++ both_str_con_add.t 9 Jul 2004 15:52:26 -0000 1.5
@@ -19,5 +19,5 @@
chomp(my $reply = <$socket>||'');
$str = lc $str;
$str =~ s/modperl/mod_perl/;
- ok t_cmp($str, $reply);
+ ok t_cmp($reply, $str);
}
1.5 +1 -1 modperl-2.0/t/filter/both_str_req_add.t
Index: both_str_req_add.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/both_str_req_add.t,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- both_str_req_add.t 14 Feb 2004 23:22:06 -0000 1.4
+++ both_str_req_add.t 9 Jul 2004 15:52:26 -0000 1.5
@@ -13,5 +13,5 @@
$expected .= "end"; # that's what the anon output filter does
my $location = '/TestFilter__both_str_req_add';
my $response = POST_BODY $location, content => $data;
-ok t_cmp($expected, $response, "lc input and reverse output filters");
+ok t_cmp($response, $expected, "lc input and reverse output filters");
1.5 +1 -1 modperl-2.0/t/filter/both_str_req_mix.t
Index: both_str_req_mix.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/both_str_req_mix.t,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- both_str_req_mix.t 22 Aug 2003 19:15:08 -0000 1.4
+++ both_str_req_mix.t 9 Jul 2004 15:52:26 -0000 1.5
@@ -30,6 +30,6 @@
my $expected = $response_orig;
my $received = $response_clear;
-ok t_cmp($expected, $received,
+ok t_cmp($received, $expected,
"mixing httpd and mod_perl filters, while preserving order");
1.2 +1 -1 modperl-2.0/t/filter/both_str_req_proxy.t
Index: both_str_req_proxy.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/both_str_req_proxy.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- both_str_req_proxy.t 25 Nov 2003 00:08:02 -0000 1.1
+++ both_str_req_proxy.t 9 Jul 2004 15:52:26 -0000 1.2
@@ -12,5 +12,5 @@
$expected =~ s/\s+//g; # that's what the output filter does
my $location = '/TestFilter__both_str_req_proxy/foo';
my $response = POST_BODY $location, content => $data;
-ok t_cmp($expected, $response, "lc input and reverse output filters");
+ok t_cmp($response, $expected, "lc input and reverse output filters");
1.2 +1 -1 modperl-2.0/t/filter/in_autoload.t
Index: in_autoload.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/in_autoload.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- in_autoload.t 20 Jan 2004 01:26:34 -0000 1.1
+++ in_autoload.t 9 Jul 2004 15:52:26 -0000 1.2
@@ -13,5 +13,5 @@
my $expected = lc $data;
my $received = POST_BODY $location, content => $data;
-ok t_cmp($expected, $received, "input stream filter lc autoloaded")
+ok t_cmp($received, $expected, "input stream filter lc autoloaded")
1.4 +1 -1 modperl-2.0/t/filter/in_bbs_consume.t
Index: in_bbs_consume.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/in_bbs_consume.t,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- in_bbs_consume.t 22 Aug 2003 19:15:08 -0000 1.3
+++ in_bbs_consume.t 9 Jul 2004 15:52:26 -0000 1.4
@@ -16,4 +16,4 @@
my $data = $expected . "x" x $length;
my $received = POST_BODY $location, content => $data;
-ok t_cmp($expected, $received, "input bbs filter full consume")
+ok t_cmp($received, $expected, "input bbs filter full consume")
1.4 +5 -5 modperl-2.0/t/filter/in_bbs_inject_header.t
Index: in_bbs_inject_header.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/in_bbs_inject_header.t,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- in_bbs_inject_header.t 27 Feb 2004 01:23:32 -0000 1.3
+++ in_bbs_inject_header.t 9 Jul 2004 15:52:26 -0000 1.4
@@ -52,15 +52,15 @@
"request has failed (the response code was: " . $res->code . ")",
"see t/logs/error_log for more details\n" unless $res->is_success;
- ok t_cmp($content, $res->content, "body");
+ ok t_cmp($res->content, $content, "body");
- ok t_cmp($header1_val,
- $res->header($header1_key),
+ ok t_cmp($res->header($header1_key),
+ $header1_val,
"injected header $header1_key");
for my $key (sort keys %headers) {
- ok t_cmp($headers{$key},
- $res->header($key),
+ ok t_cmp($res->header($key),
+ $headers{$key},
"injected header $key");
}
}
1.3 +1 -1 modperl-2.0/t/filter/in_bbs_underrun.t
Index: in_bbs_underrun.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/in_bbs_underrun.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- in_bbs_underrun.t 15 May 2003 07:36:23 -0000 1.2
+++ in_bbs_underrun.t 9 Jul 2004 15:52:26 -0000 1.3
@@ -16,4 +16,4 @@
my $received = POST_BODY $location, content => $data;
my $expected = "read $length chars";
-ok t_cmp($expected, $received, "input bbs filter underrun test")
+ok t_cmp($received, $expected, "input bbs filter underrun test")
1.2 +1 -1 modperl-2.0/t/filter/in_error.t
Index: in_error.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/in_error.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- in_error.t 23 Dec 2003 03:02:34 -0000 1.1
+++ in_error.t 9 Jul 2004 15:52:26 -0000 1.2
@@ -10,5 +10,5 @@
my $location = '/TestFilter__in_error';
my $res = POST $location, content => 'foo';
-ok t_cmp(500, $res->code, "an error in a filter should cause 500");
+ok t_cmp($res->code, 500, "an error in a filter should cause 500");
1.3 +4 -4 modperl-2.0/t/filter/in_str_bin_data.t
Index: in_str_bin_data.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/in_str_bin_data.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- in_str_bin_data.t 16 Mar 2004 01:21:30 -0000 1.2
+++ in_str_bin_data.t 9 Jul 2004 15:52:26 -0000 1.3
@@ -15,12 +15,12 @@
for my $location (@locations) {
my $received = POST_BODY_ASSERT $location, content => $expected;
- ok t_cmp(length($expected),
- length($received),
+ ok t_cmp(length($received),
+ length($expected),
"$location binary response length");
- ok t_cmp($expected,
- $received,
+ ok t_cmp($received,
+ $expected,
"$location binary response data");
}
1.4 +1 -1 modperl-2.0/t/filter/in_str_consume.t
Index: in_str_consume.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/in_str_consume.t,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- in_str_consume.t 27 Aug 2003 04:42:37 -0000 1.3
+++ in_str_consume.t 9 Jul 2004 15:52:26 -0000 1.4
@@ -18,4 +18,4 @@
my $received = POST_BODY $location, content => $data;
-ok t_cmp($expected, $received, "input stream filter partial consume")
+ok t_cmp($received, $expected, "input stream filter partial consume")
1.3 +1 -1 modperl-2.0/t/filter/in_str_lc.t
Index: in_str_lc.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/in_str_lc.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- in_str_lc.t 18 Apr 2003 06:18:56 -0000 1.2
+++ in_str_lc.t 9 Jul 2004 15:52:26 -0000 1.3
@@ -14,5 +14,5 @@
my $expected = lc $data;
my $received = POST_BODY $location, content => $data;
-ok t_cmp($expected, $received, "input stream filter lc")
+ok t_cmp($received, $expected, "input stream filter lc")
1.3 +1 -1 modperl-2.0/t/filter/in_str_sandwich.t
Index: in_str_sandwich.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/in_str_sandwich.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- in_str_sandwich.t 18 Apr 2003 06:18:56 -0000 1.2
+++ in_str_sandwich.t 9 Jul 2004 15:52:26 -0000 1.3
@@ -12,5 +12,5 @@
my $expected = join "\n", qw(HEADER BODY TAIL), '';
my $received = POST_BODY $location, content => "BODY\n";
-ok t_cmp($expected, $received, "input stream filter sandwich")
+ok t_cmp($received, $expected, "input stream filter sandwich")
1.4 +1 -1 modperl-2.0/t/filter/out_bbs_ctx.t
Index: out_bbs_ctx.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/out_bbs_ctx.t,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- out_bbs_ctx.t 18 Apr 2003 06:18:56 -0000 1.3
+++ out_bbs_ctx.t 9 Jul 2004 15:52:26 -0000 1.4
@@ -19,5 +19,5 @@
# test the filtering of the mod_perl response handler
my $location = '/TestFilter__out_bbs_ctx';
my $response = GET_BODY $location;
- ok t_cmp($expected, $response, "context filter");
+ ok t_cmp($response, $expected, "context filter");
}
1.4 +1 -1 modperl-2.0/t/filter/out_str_ctx.t
Index: out_str_ctx.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/out_str_ctx.t,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- out_str_ctx.t 18 Apr 2003 06:18:56 -0000 1.3
+++ out_str_ctx.t 9 Jul 2004 15:52:26 -0000 1.4
@@ -20,5 +20,5 @@
# test the filtering of the mod_perl response handler
my $location = '/TestFilter__out_str_ctx';
my $response = GET_BODY $location;
- ok t_cmp($expected, $response, "context stream filter");
+ ok t_cmp($response, $expected, "context stream filter");
}
1.3 +1 -1 modperl-2.0/t/filter/out_str_declined.t
Index: out_str_declined.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/out_str_declined.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- out_str_declined.t 18 Apr 2003 06:18:56 -0000 1.2
+++ out_str_declined.t 9 Jul 2004 15:52:26 -0000 1.3
@@ -11,5 +11,5 @@
my $location = '/TestFilter__out_str_declined';
my $response = GET_BODY $location;
-ok t_cmp($expected, $response, "an output filter handler returning DECLINED");
+ok t_cmp($response, $expected, "an output filter handler returning DECLINED");
1.3 +1 -1 modperl-2.0/t/filter/out_str_remove.t
Index: out_str_remove.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/out_str_remove.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- out_str_remove.t 18 Apr 2003 06:18:56 -0000 1.2
+++ out_str_remove.t 9 Jul 2004 15:52:26 -0000 1.3
@@ -10,5 +10,5 @@
my $expected = "F_O_O_b_a_r_";
my $location = '/TestFilter__out_str_remove';
my $response = GET_BODY $location;
-ok t_cmp($expected, $response, "a filter that removes itself");
+ok t_cmp($response, $expected, "a filter that removes itself");
1.3 +1 -1 modperl-2.0/t/filter/out_str_req_eos.t
Index: out_str_req_eos.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/out_str_req_eos.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- out_str_req_eos.t 18 Apr 2003 06:18:56 -0000 1.2
+++ out_str_req_eos.t 9 Jul 2004 15:52:26 -0000 1.3
@@ -16,5 +16,5 @@
my $expected = join '', $prefix, $content, $suffix;
my $received = POST_BODY $location, content => $content;
-ok t_cmp($expected, $received,
+ok t_cmp($received, $expected,
"testing the EOS bucket forwarding through the mp filters chains");
1.4 +2 -2 modperl-2.0/t/filter/out_str_reverse.t
Index: out_str_reverse.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/out_str_reverse.t,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- out_str_reverse.t 18 Apr 2003 06:18:56 -0000 1.3
+++ out_str_reverse.t 9 Jul 2004 15:52:26 -0000 1.4
@@ -19,7 +19,7 @@
# test the filtering of the mod_perl response handler
my $location = '/TestFilter__out_str_reverse';
my $response = POST_BODY $location, content => $reversed_data;
- ok t_cmp($expected, $response, "reverse filter");
+ ok t_cmp($response, $expected, "reverse filter");
}
{
@@ -27,5 +27,5 @@
my $location = '/filter/reverse.txt';
my $response = GET_BODY $location;
$response =~ s/\r//g;
- ok t_cmp($expected, $response, "reverse filter");
+ ok t_cmp($response, $expected, "reverse filter");
}
1.3 +1 -1 modperl-2.0/t/filter/out_str_subreq_default.t
Index: out_str_subreq_default.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/out_str_subreq_default.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- out_str_subreq_default.t 30 Apr 2004 05:49:19 -0000 1.2
+++ out_str_subreq_default.t 9 Jul 2004 15:52:26 -0000 1.3
@@ -20,5 +20,5 @@
# Win32 fix for line endings
$received =~ s{\r}{}g if Apache::TestConfig::WIN32;
-ok t_cmp($expected, $received,
+ok t_cmp($received, $expected,
"testing filter-originated lookup_uri() call to core served URI");
1.2 +1 -1 modperl-2.0/t/filter/out_str_subreq_modperl.t
Index: out_str_subreq_modperl.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/out_str_subreq_modperl.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- out_str_subreq_modperl.t 4 Mar 2004 15:16:10 -0000 1.1
+++ out_str_subreq_modperl.t 9 Jul 2004 15:52:26 -0000 1.2
@@ -17,5 +17,5 @@
my $expected = join '', $content1, $subrequest, $content2, $filter;
my $received = GET_BODY $location;
-ok t_cmp($expected, $received,
+ok t_cmp($received, $expected,
"testing filter-originated lookup_uri() call to modperl-served URI");
1.6 +1 -1 modperl-2.0/t/filter/TestFilter/in_str_declined.pm
Index: in_str_declined.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/in_str_declined.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- in_str_declined.pm 31 Mar 2003 01:50:51 -0000 1.5
+++ in_str_declined.pm 9 Jul 2004 15:52:27 -0000 1.6
@@ -40,7 +40,7 @@
if ($r->method_number == Apache::M_POST) {
# consume the data so the input filter is invoked
my $data = ModPerl::Test::read_post($r);
- ok t_cmp(20000, length $data, "the request body received ok");
+ ok t_cmp(length $data, 20000, "the request body received ok");
}
# ~20k of input makes it four bucket brigades:
1.7 +1 -1 modperl-2.0/t/filter/TestFilter/in_str_msg.pm
Index: in_str_msg.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/in_str_msg.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- in_str_msg.pm 13 May 2004 01:59:18 -0000 1.6
+++ in_str_msg.pm 9 Jul 2004 15:52:27 -0000 1.7
@@ -78,7 +78,7 @@
my $received = ModPerl::Test::read_post($r);
- ok t_cmp($expected, $received,
+ ok t_cmp($received, $expected,
"request filter must have upcased the data");
Apache::OK;
1.6 +5 -5 modperl-2.0/t/filter/TestFilter/out_str_api.pm
Index: out_str_api.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/filter/TestFilter/out_str_api.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- out_str_api.pm 31 May 2004 05:51:14 -0000 1.5
+++ out_str_api.pm 9 Jul 2004 15:52:27 -0000 1.6
@@ -35,7 +35,7 @@
plan tests => 8;
- ok t_cmp($response_data, $data, "response data");
+ ok t_cmp($data, $response_data, "response data");
ok $filter->isa('Apache::Filter');
@@ -43,11 +43,11 @@
my $frec = $filter->frec;
ok $frec->isa('Apache::FilterRec');
- ok t_cmp("modperl_request_output", $frec->name, '$frec->name');
+ ok t_cmp($frec->name, "modperl_request_output", '$frec->name');
my $next = $filter->next;
- ok t_cmp("modperl_request_output",
- $next->frec->name, '$filter->next->frec->name');
+ ok t_cmp($next->frec->name, "modperl_request_output",
+ '$filter->next->frec->name');
$next = $next->next;
# since we can't ensure that the next filter will be the same,
@@ -62,7 +62,7 @@
ok $r->isa('Apache::RequestRec');
my $path = '/' . Apache::TestRequest::module2path(__PACKAGE__);
- ok t_cmp($path, $r->uri, "path");
+ ok t_cmp($r->uri, $path, "path");
untie *STDOUT;