TEST2::BUNDLE::SIMPLE(3pm)
π NAME π
Test2::Bundle::Simple β it's ALMOST a drop-in replacement for Test::Simple, and honestly? iconic behavior. (This is the Test2::...::Simple(3pm) page from the Perl Programmers Reference Guide btw, in case you were wondering where you wandered into π)
β¨ DESCRIPTION β¨
Okay so bestie, this bundle is intended to be a (mostly) drop-in replacement for Test::Simple. That "mostly" is doing a lot of work, so if you wanna know what's different, scroll your cute self down to "KEY DIFFERENCES FROM Test::Simple". No cap, read it. π
π¦ SYNOPSIS π¦
use Test2::Bundle::Simple;
ok(1, "pass");
done_testing;
Literally that's it. Three lines and you're testing. slay.
πΈ PLUGINS πΈ
This loads Test2::Plugin::ExitSummary. That's the whole list. One plugin. Lowkey efficient of it.
π₯ TOOLS π₯
Heads up: these are all from Test2::Tools::Basic. Every single one, fr fr.
ok($bool, $name)β run a test. If bool is true, the test passes π. If bool is false, it fails π. That's the entire vibe check, no notes.plan($count)β tells the system how many tests to expect. Like sending the group chat a "hey I'm bringing 5 people" text. Communication! π«Άskip_all($reason)β tells the system to skip all the tests, and yes, this will exit the script. Gone. Bye. Not me leaving the party early π (but it's a legit strategic exit and it needs a reason, give it one).done_testing();β tells the system that all tests are complete. You can use this instead of setting a plan. Bestie, this is the "we're done here" of planning. Very main character energy π
π KEY DIFFERENCES FROM Test::Simple π
π« You cannot plan at import
Sorry queen, this will NOT work:
use Test2::Bundle::Simple tests => 5;
Yeah. That one? Dead. Instead you must plan in a separate statement:
use Test2::Bundle::Simple;
plan 5;
Separate statement. Two lines. That's the assignment, and it's honestly not that deep π
π You have three subs imported for use in planning
Use plan($count), skip_all($reason), or done_testing() for your planning. Three little icons, pick your fighter β¨
π§ SOURCE π§
The source code repository for Test2-Suite can be found at https://github.com/Test-More/test-more/. Go visit, it's giving open source excellence π¦
π MAINTAINERS π
Chad Granum <exodist@cpan.org>
β AUTHORS β
Chad Granum <exodist@cpan.org>
(Yes, same person. One legend, two headings. Respect the grind π)
π 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/
and that's the whole page bestie!! πβ¨ this was perl v5.42.3 from 2026-11-03, mwah, go write some tests ππΈ
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl 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