stas 2004/08/01 22:36:34
Modified: t/response/TestAPI request_rec.pm
Log:
improve the test
Revision Changes Path
1.29 +21 -23 modperl-2.0/t/response/TestAPI/request_rec.pm
Index: request_rec.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/response/TestAPI/request_rec.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -u -r1.28 -r1.29
--- request_rec.pm 1 Aug 2004 23:53:13 -0000 1.28
+++ request_rec.pm 2 Aug 2004 05:36:34 -0000 1.29
@@ -48,19 +48,18 @@
ok (! $r->$_()) || $r->$_()->isa('Apache::RequestRec');
}
- ok $r->the_request || 1;
-
ok !$r->assbackwards;
- ok $r->proxyreq || 1;
+ ok !$r->proxyreq; # see also TestModules::proxy
ok !$r->header_only;
ok $r->protocol =~ /http/i;
- ok $r->proto_num;
+ # HTTP 1.0
+ ok t_cmp $r->proto_num, 1000, 't->proto_num';
- ok t_cmp $r->hostname, $r->get_server_name, "hostname";
+ ok t_cmp $r->hostname, $r->get_server_name, '$r->hostname';
ok $r->request_time;
@@ -68,12 +67,9 @@
ok $r->status || 1;
- ok t_cmp $r->method, 'GET', "method";
-
- ok t_cmp $r->method_number, Apache::M_GET, "method number";
+ ok t_cmp $r->method, 'GET', '$r->method';
- #allowed_xmethods
- #allow_methods
+ ok t_cmp $r->method_number, Apache::M_GET, '$r->method_number';
ok $r->headers_in;
@@ -90,12 +86,6 @@
ok $r->handler;
- # content_encoding is tested in TestAPI::content_encoding
-
- #content_languages
-
- #user
-
ok $r->ap_auth_type || 1;
ok $r->no_cache || 1;
@@ -127,6 +117,9 @@
ok t_cmp $r->args, $args, '$r->args';
+ ok t_cmp $r->the_request, "GET $base_uri$path_info?$args HTTP/1.0",
+ '$r->the_request';
+
ok $r->filename;
my $location = '/' . Apache::TestRequest::module2path(__PACKAGE__);
@@ -171,14 +164,19 @@
ok $r->allowed & (1 << Apache::M_PUT);
}
- # per_dir_config in several other tests
-
- # request_config
-
- # input_filters and output_filters are tested in
- # TestAPI::in_out_filters;
- # eos_sent
+ # tested in other tests
+ # - input_filters: TestAPI::in_out_filters
+ # - output_filters: TestAPI::in_out_filters
+ # - per_dir_config: in several other tests
+ # - content_encoding: TestAPI::content_encoding
+ # - user: TestHooks::authz / TestHooks::authen
+
+ # XXX: untested
+ # - request_config
+ # - content_languages
+ # - allowed_xmethods
+ # - allow_methods
Apache::OK;
}