Here's a diff for making the code for the APR::Table test run from both t/apr/ and t/apr-ext/.
+1, perfect.
+require TestAPRlib::table;
why not 'use'?
Further, I'd suggest to have a parallel function which returns the number of sub-tests will be run. e.g. in this tests case TestAPRlib::table::test_number(), which will do all the calculations and tell the caller how many tests TestAPRlib::table::test() is going to run. So the skeleton will become:
use TestAPRlib::foo;
my $local_tests = 5; my $common_tests = TestAPRlib::foo::test_number();
plan tests => $local_tests + $common_tests;
TestAPRlib::foo::test();
# now run local tests if any (e.g. mp-specific ones)
In the case of apr::table that will be a hardcoded number:
package TestAPRlib::table;
sub test_number { 38 }in the case of more complicated tests with skips, it can be a more complicated function, but the added value that now the caller doesn't need to hardcoded that number and the library can adjust things dynamically, and have a different number of tests for apr/mp and apr-ext.
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
