Author: joes
Date: Sun Feb 20 09:23:37 2005
New Revision: 154532
URL: http://svn.apache.org/viewcvs?view=rev&rev=154532
Log:
Add module.pm and error.pm perl glue API tests.
Added:
httpd/apreq/branches/multi-env-unstable/glue/perl/t/response/TestAPI/error.pm
httpd/apreq/branches/multi-env-unstable/glue/perl/t/response/TestAPI/module.pm
Modified:
httpd/apreq/branches/multi-env-unstable/glue/perl/t/api/ (props changed)
Propchange: httpd/apreq/branches/multi-env-unstable/glue/perl/t/api/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sun Feb 20 09:23:37 2005
@@ -1,2 +1,4 @@
cookie.t
param.t
+error.t
+module.t
Added:
httpd/apreq/branches/multi-env-unstable/glue/perl/t/response/TestAPI/error.pm
URL:
http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/glue/perl/t/response/TestAPI/error.pm?view=auto&rev=154532
==============================================================================
---
httpd/apreq/branches/multi-env-unstable/glue/perl/t/response/TestAPI/error.pm
(added)
+++
httpd/apreq/branches/multi-env-unstable/glue/perl/t/response/TestAPI/error.pm
Sun Feb 20 09:23:37 2005
@@ -0,0 +1,24 @@
+package TestAPI::error;
+
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+use Apache::TestUtil;
+
+use APR::Request::Apache2;
+
+sub handler {
+ my $r = shift;
+ plan $r, tests => 1;
+
+ my $req = APR::Request::Apache2->new($r);
+ ok $req->isa("APR::Request");
+
+ # XXX export some constants, and test apreq_xs_strerror
+
+ return 0;
+}
+
+
+1;
Added:
httpd/apreq/branches/multi-env-unstable/glue/perl/t/response/TestAPI/module.pm
URL:
http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/glue/perl/t/response/TestAPI/module.pm?view=auto&rev=154532
==============================================================================
---
httpd/apreq/branches/multi-env-unstable/glue/perl/t/response/TestAPI/module.pm
(added)
+++
httpd/apreq/branches/multi-env-unstable/glue/perl/t/response/TestAPI/module.pm
Sun Feb 20 09:23:37 2005
@@ -0,0 +1,35 @@
+package TestAPI::module;
+
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+use Apache::TestUtil;
+
+use APR::Request::Apache2;
+
+sub handler {
+ my $r = shift;
+ plan $r, tests => 9;
+
+ my $req = APR::Request::Apache2->new($r);
+ ok $req->isa("APR::Request::Apache2");
+
+ ok t_cmp $req->brigade_limit, 256 * 1024, "default brigade limit is 256K";
+ ok $req->brigade_limit(1024);
+ ok t_cmp $req->brigade_limit, 1024, "brigade_limit reset to 1K";
+
+ ok $req->read_limit(1024 * 1024);
+ ok t_cmp $req->read_limit, 1024 * 1024, "read_limit reset to 1M";
+
+ ok not defined $req->temp_dir;
+ ok $req->temp_dir("/tmp");
+ ok t_cmp $req->temp_dir, "/tmp", "temp dir reset to /tmp";
+
+ # XXX parse, header_in & header_out tests
+
+ return 0;
+}
+
+
+1;