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 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