Test2::...::Simple(3)
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 π
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
- 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