Test::S...dle::V1(3)

πŸ“¦
version 1.302027 Β· 2 versions
, in fedora 43

πŸ’– Test::Stream::Bundle::V1 β€” the manual page, bestie edition πŸ’–

okay so this is Test::Stream::Bundle::V1, from the User Contributed Perl Documentation corner of the internet. It's the bundle the Test::Stream author reaches for the most. Sit down, grab a strawberry πŸ“, we're going through it.


🚨 DEPRECATED 🚨

ngl bestie, this whole distribution is deprecated. It's been superseded by Test2, Test2::Suite, and Test2::Workflow.

If you're stuck on the old thing and need to migrate, there's a conversion guide waiting for you in Test::Stream::Manual::ToTest2. Go read it, it's giving glow-up. ✨


🌸 DESCRIPTION 🌸

This bundle is literally the one used the most in Test::Stream's own test suite. It ties together all the most commonly used tools so you don't have to hand-pick them like it's a build-your-own-bowl situation. One bundle, everything you need, periodt. πŸ’…


✨ SYNOPSIS ✨

Heads up: only the most critical functions are listed here. Each individual plugin has its own functions, so go peek at those for the full menu.

use Test::Stream '-V1';

ok(1, "This is a pass");
ok(0, "This is a fail");

is("x", "x", "These strings are the same");
is($A, $B, "These 2 structures match exactly");

like('x', qr/x/, "This string matches this pattern");
like($A, $B, "These structures match where it counts");

done_testing;

See how clean that is? That's the whole vibe. πŸ¦‹


πŸŽ€ INCLUDED TOOLS πŸŽ€

Here's the lineup, one by one, no skips. πŸ‘‘

strict

strict is turned on for you. Automatic. No cap.

warnings

warnings are turned on for you. Also automatic. You're welcome. 🫢

Compare

This is the one that gives you is() and like(). It can also hand you other tools to make deep comparisons easier, but they are not imported by default β€” so don't come for them unless you actually ask.

See Test::Stream::Plugin::Compare for more details.

Context

This provides the context() function, which is lowkey essential if you're writing new tools or wrapping up existing ones.

See Test::Stream::Plugin::Context for more details.

Core

This gives you the essential essentials: ok(), done_testing(), and a whole bunch of others. The main character tools, fr fr.

See Test::Stream::Plugin::Core for more details.

Exception

This one gives you tools to intercept exceptions, or to check that an exception didn't happen. It's very similar to Test::Fatal β€” in fact, Test::Fatal is probably better. If you can use Test::Fatal, use it. If you genuinely cannot, then this may suffice. πŸ’€

Good news though: the functions it exports do not conflict with the ones exported by Test::Fatal, so you can totally load both together. Iconic behaviour honestly.

See Test::Stream::Plugin::Exception for more details.

ExitSummary

This provides extra diagnostics at the end of failing tests. When things go wrong, at least they go wrong loudly. πŸ“’

See Test::Stream::Plugin::ExitSummary for more details.

IPC

This loads IPC support so that threading and forking just work. No extra steps, it just works. 🌈

See Test::Stream::Plugin::IPC for more details.

Mock

This provides the mock() and mocked() functions, which can be used to do nearly any kind of mocking you might need. Nearly any. Go off. 🎭

See Test::Stream::Plugin::Mock for more details.

TAP

This sets TAP to be the default output format. Classic. Reliable. Never not in style.

See Test::Stream::Plugin::TAP for more details.

UTF8

This module turns on the utf8 pragma for your test file β€” and it also sets STDERR, STDOUT and the formatter output handles to use utf8. Full unicode glow-up. πŸ’œ

See Test::Stream::Plugin::UTF8 for more details.

Warnings

This plugin provides tools to help intercept warnings. Yes, warnings, plural, catching them, all of them.

See Test::Stream::Plugin::Warnings for more details.


πŸ” SOURCE πŸ”

The source code repository for Test::Stream can be found at http://github.com/Test-More/Test-Stream/.


πŸ‘‘ MAINTAINERS πŸ‘‘

  • Chad Granum <exodist@cpan.org>

πŸ’œ AUTHORS πŸ’œ

  • Chad Granum <exodist@cpan.org>

Copyright 2015 Chad Granum <exodist7@gmail.com>.

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! πŸŽ€ Big love to perl v5.42.0, dated 2025-07-25 β€” shoutout to the version that carried this doc into your terminal. Stay testing, stay slaying. πŸ’–βœ¨πŸ¦‹πŸŒΈπŸ’…

πŸ“¦ where this page comes from