httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: cvs commit: httpd-test/perl-framework/t/apache getfile.t
Date Tue, 04 Dec 2001 18:53:44 GMT
Doug MacEachern wrote:

> On Wed, 5 Dec 2001, Stas Bekman wrote:
>  
> 
>>I didn't get you? do you prefer to make this change and disengage skip 
>>stuff from plan:
>>
>>  skip_unless(...);
>>  plan tests => $tests;
>>
> 
> i'd like it if the current shorthand continues to work:
> plan tests => $tests, ['lwp', 'cgi'];
> 
> i would not like it if the only option to plan was the return value of
> skip_unless.  so if the skip_unless extensions do not fit into the
> overloaded plan, then just detach it like you have above.  we only call it
> in one .t at the moment (byterange), and i guess one more would call it if
> the extension is made (getfile).

having two places where the test can be told to skip is confusing. So 
you only want to preserve:

   plan tests => $tests, ['lwp', 'cgi'];

i.e. the ref eq ARRAY part in the original implementation of overloaded 
plan().

Otherwise I think I can fit skip_unless as a function that can handle 
*any* requirement. e.g.:

+  skip_unless({sub {$a==$b} => "$a != $b!"
+               sub {$a==1}  => "$a != 1!"},
+              'LWP',
+              'cgi_d',
+               {sub {0} => "forced to be skipped"},
+             );

is that ok?

If so we advise users to use skip_unless() everywhere and [qw(foo bar)] 
as a shortcut.


_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


Mime
View raw message