As it was fairly easy to do, here's an implementation
of the apr/constants test split up so that both
t/apr and t/apr-ext use the same code for the tests.

=========================================================
Index: t/apr-ext/constants.t
===================================================================
RCS file: t/apr-ext/constants.t
diff -N t/apr-ext/constants.t
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ t/apr-ext/constants.t       14 Jul 2004 02:05:26 -0000
@@ -0,0 +1,10 @@
+use strict;
+use warnings FATAL => 'all';
+use Apache::Test;
+
+use lib q(t/lib);
+require TestAPRlib::constants;
+
+plan tests => 5;
+
+TestAPRlib::constants::test();
Index: t/apr/constants.t
===================================================================
RCS file: /home/cvs/modperl-2.0/t/apr/constants.t,v
retrieving revision 1.4
diff -u -r1.4 constants.t
--- t/apr/constants.t   8 Jul 2004 06:06:33 -0000       1.4
+++ t/apr/constants.t   14 Jul 2004 02:05:26 -0000
@@ -1,19 +1,10 @@
-use ExtUtils::testlib;
 use strict;
 use warnings FATAL => 'all';
+use Apache::Test;

-use Test;
-
-use Apache2 ();
-use Apache::TestUtil;
-
-use APR::Const -compile => qw(:common POLLIN :filetype);
-use APR::Const qw(:hook);
+use lib q(t/lib);
+require TestAPRlib::constants;

 plan tests => 5;

-ok ! defined &POLLIN;
-ok t_cmp (APR::SUCCESS, 0, 'APR::SUCCESS');
-ok t_cmp (APR::POLLIN, 0x001, 'APR::POLLIN');
-ok t_cmp (HOOK_LAST, 20, 'HOOK_LAST');
-ok t_cmp (APR::UNKFILE, 127, 'APR::UNKFILE');
+TestAPRlib::constants::test();
Index: t/lib/TestAPRlib/constants.pm
===================================================================
RCS file: t/lib/TestAPRlib/constants.pm
diff -N t/lib/TestAPRlib/constants.pm
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ t/lib/TestAPRlib/constants.pm       14 Jul 2004 02:05:26 -0000
@@ -0,0 +1,23 @@
+package TestAPRlib::constants;
+use strict;
+use warnings FATAL => 'all';
+
+use ExtUtils::testlib;
+use Test;
+
+use Apache2 ();
+use Apache::TestUtil;
+
+use APR::Const -compile => qw(:common POLLIN :filetype);
+use APR::Const qw(:hook);
+
+sub test {
+
+    ok ! defined &POLLIN;
+    ok t_cmp (APR::SUCCESS, 0, 'APR::SUCCESS');
+    ok t_cmp (APR::POLLIN, 0x001, 'APR::POLLIN');
+    ok t_cmp (HOOK_LAST, 20, 'HOOK_LAST');
+    ok t_cmp (APR::UNKFILE, 127, 'APR::UNKFILE');
+}
+
+1;

==============================================================

-- 
best regards,
randy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to