On Thu, 15 Feb 2001, barries wrote:
> What do folks think of adding something like the following to Test.pm:
>
> my $tname ; ## ok(), skip(), todo() can get the test name from here
> my $is_todo ; ## ok() could look at this and adjust it's output
>
> sub do_all_tests {
> plan tests => scalar( grep ref eq "CODE", @_ ) ;
>
> while ( @_ ) {
> $tname = ref $_[0] eq "CODE" ? undef : shift ;
> $is_todo = defined $tname && $tname eq "todo" ;
> $name = undef if $is_todo ;
> if ( defined $tname && $tname eq "skip" ) {
> skip( 1, 0, 0 ) ;
> shift ;
> next ;
> }
> shift->( $ntest ) ;
> }
> }
This is exactly what came to mind when I saw your other email describing
how you use the Test module.
I like it.
-dave
- named tests, do_all_tests(), use autotest/selftest/testpod? barries
- Re: named tests, do_all_tests(), use autotest/selftest/t... Dave Rolsky
- Re: named tests, do_all_tests(), use autotest/selftest/t... schwern
- Re: named tests, do_all_tests(), use autotest/selftest/t... barries
- Re: named tests, do_all_tests(), use autotest/selftest/t... schwern
- Re: named tests, do_all_tests(), use autotest/selftest/t... barries
- Re: named tests, do_all_tests(), use autotest/selftest/t... schwern
- Re: named tests, do_all_tests(), use autotest/selftest/t... Piers Cawley
- Re: named tests, do_all_tests(), use autotest/selftest/t... Piers Cawley
- Re: named tests, do_all_tests(), use autotest/selftest/t... barries
- Re: named tests, do_all_tests(), use autotest/selftest/t... Piers Cawley
- Re: named tests, do_all_tests(), use autotest/selftest/t... barries
