You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by ge...@apache.org on 2005/03/08 03:01:19 UTC

svn commit: r156475 - in perl/modperl/branches/apache2-rename-unstable/t: apache/ api/ apr-ext/ compat/ hooks/ modperl/ modules/

Author: geoff
Date: Mon Mar  7 18:01:14 2005
New Revision: 156475

URL: http://svn.apache.org/viewcvs?view=rev&rev=156475
Log:
change *.t files to Apache2::

Modified:
    perl/modperl/branches/apache2-rename-unstable/t/apache/constants.t
    perl/modperl/branches/apache2-rename-unstable/t/api/custom_response.t
    perl/modperl/branches/apache2-rename-unstable/t/api/status.t
    perl/modperl/branches/apache2-rename-unstable/t/apr-ext/perlio.t
    perl/modperl/branches/apache2-rename-unstable/t/apr-ext/uuid.t
    perl/modperl/branches/apache2-rename-unstable/t/compat/request_body.t
    perl/modperl/branches/apache2-rename-unstable/t/hooks/trans.t
    perl/modperl/branches/apache2-rename-unstable/t/modperl/status.t
    perl/modperl/branches/apache2-rename-unstable/t/modules/apache_resource.t
    perl/modperl/branches/apache2-rename-unstable/t/modules/apache_status.t
    perl/modperl/branches/apache2-rename-unstable/t/modules/cgi.t
    perl/modperl/branches/apache2-rename-unstable/t/modules/cgi2.t
    perl/modperl/branches/apache2-rename-unstable/t/modules/cgiupload.t
    perl/modperl/branches/apache2-rename-unstable/t/modules/cgiupload2.t
    perl/modperl/branches/apache2-rename-unstable/t/modules/reload.t

Modified: perl/modperl/branches/apache2-rename-unstable/t/apache/constants.t
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/apache/constants.t?view=diff&r1=156474&r2=156475
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/t/apache/constants.t (original)
+++ perl/modperl/branches/apache2-rename-unstable/t/apache/constants.t Mon Mar  7 18:01:14 2005
@@ -8,14 +8,14 @@
 use Apache2 ();
 
 # -compile puts constants into the Apache:: namespace
-use Apache::Const -compile => qw(:http :common :mpmq
+use Apache2::Const -compile => qw(:http :common :mpmq
                                  TAKE23 &OPT_EXECCGI
                                  DECLINE_CMD DIR_MAGIC_TYPE 
                                  CRLF);
 
 # without -compile, constants are in the
 # caller namespace.  also defaults to :common
-use Apache::Const;
+use Apache2::Const;
 
 plan tests => 17;
 
@@ -25,57 +25,57 @@
 
 ok t_cmp(OK, 0, 'OK');
 
-ok t_cmp(Apache::OK, 0, 'Apache::OK');
+ok t_cmp(Apache2::OK, 0, 'Apache::OK');
 
-ok t_cmp(Apache::DECLINED, -1, 'Apache::DECLINED');
+ok t_cmp(Apache2::DECLINED, -1, 'Apache::DECLINED');
 
-ok t_cmp(Apache::HTTP_GONE, 410, 'Apache::HTTP_GONE');
+ok t_cmp(Apache2::HTTP_GONE, 410, 'Apache::HTTP_GONE');
 
-ok t_cmp(Apache::DIR_MAGIC_TYPE, 
+ok t_cmp(Apache2::DIR_MAGIC_TYPE, 
          'httpd/unix-directory',
-         'Apache::DIR_MAGIC_TYPE');
+         'Apache2::DIR_MAGIC_TYPE');
 
-ok t_cmp(Apache::MPMQ_MAX_SPARE_DAEMONS, 
+ok t_cmp(Apache2::MPMQ_MAX_SPARE_DAEMONS, 
          9,
-         'Apache::MPMQ_MAX_SPARE_DAEMONS');
+         'Apache2::MPMQ_MAX_SPARE_DAEMONS');
 
 # the rest of the tests don't fit into the t_cmp() meme
 # for one reason or anothre...
 
-print "testing Apache::OPT_EXECCGI is defined\n";
-ok defined Apache::OPT_EXECCGI;
+print "testing Apache2::OPT_EXECCGI is defined\n";
+ok defined Apache2::OPT_EXECCGI;
 
-print "testing Apache::DECLINE_CMD\n";
-ok Apache::DECLINE_CMD eq "\x07\x08";
+print "testing Apache2::DECLINE_CMD\n";
+ok Apache2::DECLINE_CMD eq "\x07\x08";
 
 # try and weed out EBCDIC - this is the test httpd uses
 if (chr(0xC1) eq 'A') {
-    print "testing Apache::CRLF (EBCDIC)\n";
-    ok Apache::CRLF eq "\r\n";
+    print "testing Apache2::CRLF (EBCDIC)\n";
+    ok Apache2::CRLF eq "\r\n";
 }
 else {
-    print "testing Apache::CRLF (ASCII)\n";
-    ok Apache::CRLF eq "\015\012";
+    print "testing Apache2::CRLF (ASCII)\n";
+    ok Apache2::CRLF eq "\015\012";
 
 }
 
 print "testing M_GET not yet defined\n";
 ok ! defined &M_GET;
 
-Apache::Const->import('M_GET');
+Apache2::Const->import('M_GET');
 
 print "testing M_GET now defined\n";
 ok defined &M_GET;
 
 for (qw(BOGUS :bogus -foobar)) {
 
-    eval { Apache::Const->import($_) };
+    eval { Apache2::Const->import($_) };
 
     print "testing bogus import $_\n";
     ok $@;
 }
 
 print "testing explicit call to compile()\n";
-eval { Apache::Const::compile() };
+eval { Apache2::Const::compile() };
 
 ok $@;

Modified: perl/modperl/branches/apache2-rename-unstable/t/api/custom_response.t
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/api/custom_response.t?view=diff&r1=156474&r2=156475
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/t/api/custom_response.t (original)
+++ perl/modperl/branches/apache2-rename-unstable/t/api/custom_response.t Mon Mar  7 18:01:14 2005
@@ -7,7 +7,7 @@
 
 use File::Spec::Functions qw(catfile);
 
-use Apache::Const -compile => qw(FORBIDDEN);
+use Apache2::Const -compile => qw(FORBIDDEN);
 
 my $module   = 'TestAPI::custom_response';
 my $location = '/' . Apache::TestRequest::module2path($module);
@@ -29,7 +29,7 @@
     # custom text response
     my $expected = "This_is_a_custom_text_response";
     my $res = GET "$location?$expected";
-    ok t_cmp $res->code, Apache::FORBIDDEN, "custom text response (code)";
+    ok t_cmp $res->code, Apache2::FORBIDDEN, "custom text response (code)";
     ok t_cmp $res->content, $expected, "custom text response (body)";
 }
 

Modified: perl/modperl/branches/apache2-rename-unstable/t/api/status.t
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/api/status.t?view=diff&r1=156474&r2=156475
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/t/api/status.t (original)
+++ perl/modperl/branches/apache2-rename-unstable/t/api/status.t Mon Mar  7 18:01:14 2005
@@ -15,7 +15,7 @@
     # test a valid HTTP/1.1 status code (303). In this test
     # the handler returns OK, but sets a custom status. Apache will
     # lookup the message "See Other" on its own
-    my $code = 303; # Apache::HTTP_SEE_OTHER
+    my $code = 303; # Apache2::HTTP_SEE_OTHER
     my $message = "See Other";
     my $res = GET "$location?$code=";
     ok t_cmp $res->code, $code, "code";

Modified: perl/modperl/branches/apache2-rename-unstable/t/apr-ext/perlio.t
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/apr-ext/perlio.t?view=diff&r1=156474&r2=156475
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/t/apr-ext/perlio.t (original)
+++ perl/modperl/branches/apache2-rename-unstable/t/apr-ext/perlio.t Mon Mar  7 18:01:14 2005
@@ -9,7 +9,7 @@
 
 use Apache::Test;
 use Apache::TestUtil;
-use Apache::Build ();
+use Apache2::Build ();
 
 use Fcntl ();
 use File::Spec::Functions qw(catfile);
@@ -18,7 +18,7 @@
 #XXX: you can set to zero if largefile support is not enabled in Perl
 use constant LARGE_FILES_CONFLICT => 1;
 
-my $build = Apache::Build->build_config;
+my $build = Apache2::Build->build_config;
 
 # XXX: only when apr-config is found APR will be linked against
 # libapr/libaprutil, probably need a more intuitive method for this

Modified: perl/modperl/branches/apache2-rename-unstable/t/apr-ext/uuid.t
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/apr-ext/uuid.t?view=diff&r1=156474&r2=156475
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/t/apr-ext/uuid.t (original)
+++ perl/modperl/branches/apache2-rename-unstable/t/apr-ext/uuid.t Mon Mar  7 18:01:14 2005
@@ -4,7 +4,7 @@
 use warnings FATAL => 'all';
 
 use Apache::Test;
-use Apache::Build ();
+use Apache2::Build ();
 
 # XXX: only when apr-config is found APR will be linked against
 # libapr/libaprutil, probably need a more intuitive method for this
@@ -14,7 +14,7 @@
 # In order to do this for all the apr-ext tests, could have
 # a wrapper around plan() that does a check like
 #######
-# my $build = Apache::Build->build_config;
+# my $build = Apache2::Build->build_config;
 #
 # my $has_apr_config = $build->{apr_config_path} && 
 #    !$build->httpd_is_source_tree;

Modified: perl/modperl/branches/apache2-rename-unstable/t/compat/request_body.t
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/compat/request_body.t?view=diff&r1=156474&r2=156475
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/t/compat/request_body.t (original)
+++ perl/modperl/branches/apache2-rename-unstable/t/compat/request_body.t Mon Mar  7 18:01:14 2005
@@ -31,13 +31,13 @@
         );
 }
 
-# $r->Apache::args
+# $r->Apache2::args
 {
     my @data = (test => 'args');
     ok t_cmp(
         GET_BODY(query(@data)),
         "@data",
-        q{$r->Apache::args}
+        q{$r->Apache2::args}
         );
 }
 

Modified: perl/modperl/branches/apache2-rename-unstable/t/hooks/trans.t
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/hooks/trans.t?view=diff&r1=156474&r2=156475
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/t/hooks/trans.t (original)
+++ perl/modperl/branches/apache2-rename-unstable/t/hooks/trans.t Mon Mar  7 18:01:14 2005
@@ -6,7 +6,7 @@
 use Apache::TestRequest;
 
 use Apache2 ();
-use Apache::Const ':common';
+use Apache2::Const ':common';
 
 my $module = 'TestHooks::trans';
 Apache::TestRequest::module($module);

Modified: perl/modperl/branches/apache2-rename-unstable/t/modperl/status.t
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/modperl/status.t?view=diff&r1=156474&r2=156475
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/t/modperl/status.t (original)
+++ perl/modperl/branches/apache2-rename-unstable/t/modperl/status.t Mon Mar  7 18:01:14 2005
@@ -6,7 +6,7 @@
 use Apache::TestUtil qw(t_cmp t_server_log_error_is_expected);
 
 use Apache2;
-use Apache::Const -compile => qw(OK DECLINED
+use Apache2::Const -compile => qw(OK DECLINED
                                  NOT_FOUND SERVER_ERROR FORBIDDEN
                                  HTTP_OK);
 
@@ -16,49 +16,49 @@
 
 # valid Apache return codes
 {
-    my $uri = join '?', $base, Apache::OK;
+    my $uri = join '?', $base, Apache2::OK;
     my $code = GET_RC $uri;
 
     ok t_cmp($code,
-             Apache::HTTP_OK,
+             Apache2::HTTP_OK,
              $uri);
 }
 
 {
-    my $uri = join '?', $base, Apache::DECLINED;
+    my $uri = join '?', $base, Apache2::DECLINED;
     my $code = GET_RC $uri;
 
     # no Alias to map us to DocumentRoot
     ok t_cmp($code,
-             Apache::NOT_FOUND,
+             Apache2::NOT_FOUND,
              $uri);
 }
 
 # standard HTTP status codes
 {
-    my $uri = join '?', $base, Apache::NOT_FOUND;
+    my $uri = join '?', $base, Apache2::NOT_FOUND;
     my $code = GET_RC $uri;
 
     ok t_cmp($code,
-             Apache::NOT_FOUND,
+             Apache2::NOT_FOUND,
              $uri);
 }
 
 {
-    my $uri = join '?', $base, Apache::FORBIDDEN;
+    my $uri = join '?', $base, Apache2::FORBIDDEN;
     my $code = GET_RC $uri;
 
     ok t_cmp($code,
-             Apache::FORBIDDEN,
+             Apache2::FORBIDDEN,
              $uri);
 }
 
 {
-    my $uri = join '?', $base, Apache::SERVER_ERROR;
+    my $uri = join '?', $base, Apache2::SERVER_ERROR;
     my $code = GET_RC $uri;
 
     ok t_cmp($code,
-             Apache::SERVER_ERROR,
+             Apache2::SERVER_ERROR,
              $uri);
 }
 
@@ -69,7 +69,7 @@
     my $code = GET_RC $uri;
 
     ok t_cmp($code,
-             Apache::SERVER_ERROR,
+             Apache2::SERVER_ERROR,
              $uri);
 }
 
@@ -78,7 +78,7 @@
     my $code = GET_RC $uri;
 
     ok t_cmp($code,
-             Apache::SERVER_ERROR,
+             Apache2::SERVER_ERROR,
              $uri);
 }
 
@@ -87,7 +87,7 @@
     my $code = GET_RC $uri;
 
     ok t_cmp($code,
-             Apache::SERVER_ERROR,
+             Apache2::SERVER_ERROR,
              $uri);
 }
 
@@ -96,11 +96,11 @@
 # succeed so the 200 is propagated to the client,
 # there's an error beneath that 200 code.
 {
-    my $uri = join '?', $base, Apache::HTTP_OK;
+    my $uri = join '?', $base, Apache2::HTTP_OK;
     my $response = GET $uri;
 
     ok t_cmp($response->code,
-             Apache::HTTP_OK,
+             Apache2::HTTP_OK,
              $uri);
 
     ok t_cmp($response->content,
@@ -115,7 +115,7 @@
     my $code = GET_RC $uri;
 
     ok t_cmp($code,
-             Apache::HTTP_OK,
+             Apache2::HTTP_OK,
              $uri);
 }
 
@@ -125,7 +125,7 @@
     my $code = GET_RC $uri;
 
     ok t_cmp($code,
-             Apache::SERVER_ERROR,
+             Apache2::SERVER_ERROR,
              $uri);
 }
 
@@ -134,7 +134,7 @@
     my $code = GET_RC $uri;
 
     ok t_cmp($code,
-             Apache::HTTP_OK,
+             Apache2::HTTP_OK,
              $uri);
 }
 
@@ -143,7 +143,7 @@
     my $code = GET_RC $uri;
 
     ok t_cmp($code,
-             Apache::HTTP_OK,
+             Apache2::HTTP_OK,
              $uri);
 }
 
@@ -152,7 +152,7 @@
     my $code = GET_RC $uri;
 
     ok t_cmp($code,
-             Apache::HTTP_OK,
+             Apache2::HTTP_OK,
              $uri);
 }
 

Modified: perl/modperl/branches/apache2-rename-unstable/t/modules/apache_resource.t
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/modules/apache_resource.t?view=diff&r1=156474&r2=156475
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/t/modules/apache_resource.t (original)
+++ perl/modperl/branches/apache2-rename-unstable/t/modules/apache_resource.t Mon Mar  7 18:01:14 2005
@@ -6,12 +6,12 @@
 use Apache::TestUtil;
 
 plan tests => 1, need qw[BSD::Resource],
-    { "CGI.pm (2.93 or higher) or Apache::Request is needed" =>
+    { "CGI.pm (2.93 or higher) or Apache2::Request is needed" =>
           !!(eval { require CGI && $CGI::VERSION >= 2.93 } ||
-             eval { require Apache::Request })};
+             eval { require Apache2::Request })};
 
 {
-    # Apache::Status menu inserted by Apache::Resource
+    # Apache2::Status menu inserted by Apache::Resource
     my $url = '/status/perl?rlimit';
     my $body = GET_BODY_ASSERT $url;
     ok $body =~ /RLIMIT_CPU/;
@@ -20,6 +20,6 @@
 # more tests would be nice, but I'm not sure how to write those w/o
 # causing problems to the rest of the test suite.
 # we could enable $ENV{PERL_RLIMIT_DEFAULTS} = 1; before loading
-# Apache::Resource, which sets certain default values (works for me)
+# Apache2::Resource, which sets certain default values (works for me)
 # but it's not guaranteed that it'll work for others (since it's very
 # OS specific)

Modified: perl/modperl/branches/apache2-rename-unstable/t/modules/apache_status.t
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/modules/apache_status.t?view=diff&r1=156474&r2=156475
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/t/modules/apache_status.t (original)
+++ perl/modperl/branches/apache2-rename-unstable/t/modules/apache_status.t Mon Mar  7 18:01:14 2005
@@ -11,9 +11,9 @@
               symdump inc inh_tree sig);
 
 plan tests => @opts + 3, need
-    { "CGI.pm (2.93 or higher) or Apache::Request is needed" =>
+    { "CGI.pm (2.93 or higher) or Apache2::Request is needed" =>
           !!(eval { require CGI && $CGI::VERSION >= 2.93 } ||
-             eval { require Apache::Request })};
+             eval { require Apache2::Request })};
 
 {
     my $url = "$base_url";

Modified: perl/modperl/branches/apache2-rename-unstable/t/modules/cgi.t
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/modules/cgi.t?view=diff&r1=156474&r2=156475
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/t/modules/cgi.t (original)
+++ perl/modperl/branches/apache2-rename-unstable/t/modules/cgi.t Mon Mar  7 18:01:14 2005
@@ -4,9 +4,9 @@
 use Apache::Test;
 use Apache::TestRequest;
 use Apache::TestUtil;
-use Apache::Build ();
+use Apache2::Build ();
 
-my $build = Apache::Build->build_config;
+my $build = Apache2::Build->build_config;
 
 use constant HAVE_LWP => have_lwp();
 

Modified: perl/modperl/branches/apache2-rename-unstable/t/modules/cgi2.t
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/modules/cgi2.t?view=diff&r1=156474&r2=156475
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/t/modules/cgi2.t (original)
+++ perl/modperl/branches/apache2-rename-unstable/t/modules/cgi2.t Mon Mar  7 18:01:14 2005
@@ -4,9 +4,9 @@
 use Apache::Test;
 use Apache::TestRequest;
 use Apache::TestUtil;
-use Apache::Build ();
+use Apache2::Build ();
 
-my $build = Apache::Build->build_config;
+my $build = Apache2::Build->build_config;
 
 use constant HAVE_LWP => have_lwp();
 

Modified: perl/modperl/branches/apache2-rename-unstable/t/modules/cgiupload.t
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/modules/cgiupload.t?view=diff&r1=156474&r2=156475
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/t/modules/cgiupload.t (original)
+++ perl/modperl/branches/apache2-rename-unstable/t/modules/cgiupload.t Mon Mar  7 18:01:14 2005
@@ -4,11 +4,11 @@
 use Apache::Test;
 use Apache::TestUtil;
 use Apache::TestRequest;
-use Apache::Build ();
+use Apache2::Build ();
 
 use File::Spec::Functions qw(catfile);
 
-my $build = Apache::Build->build_config;
+my $build = Apache2::Build->build_config;
 plan tests => 2, need need_lwp(), need need_min_module_version('CGI', 2.93),
     {"MP_COMPAT_1X is disabled" => $build->{MP_COMPAT_1X}};
 

Modified: perl/modperl/branches/apache2-rename-unstable/t/modules/cgiupload2.t
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/modules/cgiupload2.t?view=diff&r1=156474&r2=156475
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/t/modules/cgiupload2.t (original)
+++ perl/modperl/branches/apache2-rename-unstable/t/modules/cgiupload2.t Mon Mar  7 18:01:14 2005
@@ -4,11 +4,11 @@
 use Apache::Test;
 use Apache::TestUtil;
 use Apache::TestRequest;
-use Apache::Build ();
+use Apache2::Build ();
 
 use File::Spec::Functions qw(catfile);
 
-my $build = Apache::Build->build_config;
+my $build = Apache2::Build->build_config;
 plan tests => 2, need need_lwp(),
     need_min_module_version(CGI => 3.01);
 

Modified: perl/modperl/branches/apache2-rename-unstable/t/modules/reload.t
URL: http://svn.apache.org/viewcvs/perl/modperl/branches/apache2-rename-unstable/t/modules/reload.t?view=diff&r1=156474&r2=156475
==============================================================================
--- perl/modperl/branches/apache2-rename-unstable/t/modules/reload.t (original)
+++ perl/modperl/branches/apache2-rename-unstable/t/modules/reload.t Mon Mar  7 18:01:14 2005
@@ -85,15 +85,15 @@
 sub touch_mtime {
     my $file = shift;
     # push the mtime into the future (at least 2 secs to work on win32)
-    # so Apache::Reload will reload the package
+    # so Apache2::Reload will reload the package
     my $time = time + 5; # make it 5 to be sure
     utime $time, $time, $file;
 }
 
 __DATA__
-package Apache::Reload::Test;
+package Apache2::Reload::Test;
 
-use Apache::Reload;
+use Apache2::Reload;
 
 our @methods = qw(simple const prototype);