mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 08:38:23 +00:00
Having to count tests is annoying for maintainers. Also, manually updating count tests is problematic when multiple people are working on the same code; it causes merge conflicts and recounts. done_testing() is available since Test::More 0.88 which was released in 2009. This commit changes all tests under lib/ that use Test::More and were planning the number of tests. Michiel Beijen is now a Perl author
39 lines
906 B
Perl
39 lines
906 B
Perl
#!./perl -w
|
|
|
|
BEGIN {
|
|
chdir 't' if -d 't';
|
|
push @INC, '../lib';
|
|
}
|
|
|
|
use Test::More;
|
|
|
|
BEGIN {
|
|
use_ok( 'less' );
|
|
|
|
package less::again;
|
|
sub stash_name {'less'}
|
|
@ISA = 'less';
|
|
$INC{'less/again.pm'} = 1;
|
|
}
|
|
|
|
is_deeply([less->of], [], 'more please');
|
|
use less;
|
|
is_deeply([less->of], ['please'],'less please');
|
|
is_deeply([less::again->of], ['please'], 'less::again please');
|
|
no less;
|
|
is_deeply([less->of],[],'more please');
|
|
is_deeply([less::again->of], [], 'no less::again please');
|
|
use less::again;
|
|
is_deeply([less->of], ['please'],'less please');
|
|
is_deeply([less::again->of], ['please'], 'less::again please');
|
|
no less::again;
|
|
is_deeply([less->of],[],'more please');
|
|
is_deeply([less::again->of], [], 'no less::again please');
|
|
|
|
use less 'random acts';
|
|
is_deeply([sort less->of],[sort qw(random acts)],'less random acts');
|
|
|
|
is(scalar less->of('random'),1,'less random');
|
|
|
|
done_testing();
|