Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 4414e9b

Browse files
committed
Test-Simple: allow optional subtest args
undocumented but used by e.g. WWW-Mechanize. So add documentation and support for it.
1 parent 93c356f commit 4414e9b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

dist/Test-Simple/lib/Test/More.pm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ sub new_ok ($class, $args?, $object_name?) {
681681

682682
=item B<subtest>
683683
684-
subtest $name => \&code;
684+
subtest $name => \&code, @args;
685685
686686
C<subtest()> runs the &code as its own little test with its own plan and
687687
its own result. The main test counts this as a single test using the
@@ -742,8 +742,8 @@ subtests are equivalent:
742742
743743
=cut
744744

745-
sub subtest ($name, $subtests) {
746-
Test::More->builder->subtest($name, $subtests);
745+
sub subtest ($name, $subtests, @args) {
746+
Test::More->builder->subtest($name, $subtests, @args);
747747
}
748748

749749
=item B<pass>

pod/perlcdelta.pod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,8 @@ systems.
756756

757757
=item Test-Simple
758758

759+
Add doc and support for optional subtest @args.
760+
759761
Moved from cpan to dist.
760762
L<[cperl #154]|https://github.com/perl11/cperl/issues/154>.
761763

0 commit comments

Comments
 (0)