Test2::...lanning(3)
π NAME π
okay so bestie, this is the Test2::Manual::Testing::Planning(3) page β User Contributed Perl Documentation edition β and it is literally about The many ways to set a plan. no cap, that is the whole vibe. π
πΈ DESCRIPTION πΈ
This tutorial covers the many ways of setting a plan, group-chat style. we are covering every route, and yes, it is giving organized. β¨
π§ TEST COUNT π§
The plan() function is provided by Test2::Tools::Basic. It lets you specify an exact number of tests to run β you can do this at the start of testing or at the end. You cannot do it partway through testing, bestie. That is the rule. π
use Test2::Tools::Basic;
plan(10); # 10 tests expected
...
π¦ DONE TESTING π¦
The done_testing() function is provided by Test2::Tools::Basic. It automatically sets the plan to the number of tests that were run. This must be used at the very end of testing. periodt. π«Ά
use Test2::Tools::Basic;
...
done_testing();
π SKIP ALL π
The skip_all() function is provided by Test2::Tools::Basic. It sets the plan to 0 and exits the test immediately. You may provide a skip reason that explains why the test should be skipped. iconic, honestly. π
use Test2::Tools::Basic;
skip_all("This test will not run here") if ...;
...
π₯ CUSTOM PLAN EVENT π₯
A plan is simply a Test2::Event::Plan event that gets sent to the current hub. You can always write your own tool to set the plan β main character energy. π
use Test2::API qw/context/;
sub set_plan {
my $count = @_;
my $ctx = context();
$ctx->send_event('Plan', max => $count);
$ctx->release;
return $count;
}
π¦ SEE ALSO π¦
Test2::Manualβ Primary index of the manual.
π SOURCE π
The source code repository for Test2-Manual can be found at https://github.com/Test-More/test-more/.
π MAINTAINERS π
- Chad Granum
<exodist@cpan.org>
π AUTHORS π
- Chad Granum
<exodist@cpan.org>
π COPYRIGHT π
Copyright Chad Granum <exodist@cpan.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://dev.perl.org/licenses/
π okay that is the whole page, bestie β perl v5.42.0, dated 2025-07-28, manual Test2::...lanning(3). bye, slay! π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: perl-Test-Simple 1.302214-bp160.1.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms