Test2::...::Simple(3)

πŸ“¦ version 1.302214, in opensuse-leap 16.0

Bestie, welcome to Test2::...::Simple(3) from the User Contributed Perl Documentation. The main character here is Test2::Bundle::Simple, and the vibes are very β€œalmost drop-in, but read the fine print.” πŸ¦‹

🌸 NAME 🌸

Test2::Bundle::Simple β€” ALMOST a drop-in replacement for Test::Simple. πŸ’…

πŸ’– DESCRIPTION πŸ’–

This bundle is intended to be a (mostly) drop-in replacement for Test::Simple. See β€œKEY DIFFERENCES FROM Test::Simple” for details. No cap, the β€œmostly” is doing important work here. πŸ‘‘

✨ SYNOPSIS ✨

use Test2::Bundle::Simple;

ok(1, "pass");

done_testing;

Slay, that’s the whole little vibe check. πŸŽ€

🧩 PLUGINS 🧩

This loads Test2::Plugin::ExitSummary. That’s the plug-in moment. πŸ”Œ

πŸ› οΈ TOOLS πŸ› οΈ

These are all from Test2::Tools::Basic. Iconic little toolbox, fr fr. 🧰

  • ok($bool, $name) β€” run a test. If bool is true, the test passes. If bool is false, it fails. Simple queen behavior. βœ…βŒ
  • plan($count) β€” tell the system how many tests to expect. Gotta set the expectations, bestie. πŸ”’
  • skip_all($reason) β€” tell the system to skip all the tests. Heads up: this will exit the script. πŸ’€
  • done_testing(); β€” tell the system that all tests are complete. You can use this instead of setting a plan. Very β€œwe’re done here” energy. 🫢

πŸ’… KEY DIFFERENCES FROM Test::Simple πŸ’…

🚫 You cannot plan at import.

THIS WILL NOT WORK:

use Test2::Bundle::Simple tests => 5;

Instead you must plan in a separate statement:

use Test2::Bundle::Simple;
plan 5;

πŸ“ You have three subs imported for use in planning

Use plan($count), skip_all($reason), or done_testing() for your planning. Three little planning besties, no import-time tricks. 🌈

πŸ“¦ SOURCE πŸ“¦

The source code repository for Test2-Suite can be found at https://github.com/Test-More/test-more/. Go peek, it’s giving open source excellence. πŸ”₯

πŸ‘‘ MAINTAINERS πŸ‘‘

  • Chad Granum <exodist@cpan.org>

🌟 AUTHORS 🌟

  • Chad Granum <exodist@cpan.org>

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 bye bestie, mwah πŸ’‹ β€” this page is from perl v5.42.0, dated 2025-07-28, and you just read Test2::...::Simple(3). Stay slaying those tests. πŸ“πŸ§šπŸ’œ

πŸ“¦ where this page comes from