Test::...:Simple(3pm)

πŸ“¦
version 2.214 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking

🌸 NAME 🌸

Test::Inline::Content::Simple β€” it's giving Simple templating Content Handler πŸ’…

okay bestie so this is the page for Test::...:Simple(3pm) (yes the header is being extra, the real one is Test::Inline::Content::Simple) and she is so much simpler than she looks, trust 🫢


✨ VERSION ✨

version 2.214 β€” that's the one, no cap πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

so here's the vibe, in your inline2test.tpl:

In your inline2test.tpl
----------------------
#!/usr/bin/perl -w

use strict;
use Test::More [% plan %];
$| = 1;

[% tests %]

1;

like... it's a template, it's cute, it does the thing πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so real talk: it is relatively common to want to customise the contents of the generated test files β€” you know, to set up custom environment things on an all-scripts basis, instead of doing it file by file (which is what =begin SETUP blocks are for). 🌈

and Test::Inline::Content::Simple lets you do exactly that, using a very simple Template Toolkit style template to define all that info. iconic behaviour honestly.

she contains only two tags, and they are plan and tests. that's it. two. minimal queen πŸŽ€

  • the plan tag gets inserted as either "tests =" 123> or 'no_plan'
  • the tests tag gets replaced by the actual testing code

periodt πŸ’…


πŸ’œ METHODS πŸ’œ

πŸ“ new $filename

manually create a new Test::Inline::Content::Simple object. she takes as a parameter a single filename which should contain the template code. πŸ“„

returns a new Test::Inline::Content::Simple object, or undef on error. (so like, check it, bestie 😭)

🌸 template

the template accessor returns the template content for the object. she just hands it over. simple as that 🫢

🧚 process $Inline, $Script

the process method is unchanged from Test::Inline::Content. nothing new here, same energy, same method ✨


πŸ”₯ SUPPORT πŸ”₯

see the main SUPPORT section πŸ‘€

bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Test-Inline> (or bug-Test-Inline@rt.cpan.org <mailto:bug-Test-Inline@rt.cpan.org>). ngl if you found a bug, tell them, they wanna know πŸ’€


πŸ‘‘ AUTHOR πŸ‘‘

Adam Kennedy <adamk@cpan.org> β€” the main character who wrote this, we stan 🫢


this software is copyright (c) 2003 by Adam Kennedy.

this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, open source πŸ’…


and that's the whole page bestie!! this doc came to you courtesy of perl v5.32.0 dated 2021-01-31, filed under Test::...:Simple(3pm) (the header said it, not me πŸ™ˆ) β€” mwah, go write some tests πŸ’‹βœ¨

πŸ“¦ where this page comes from