The perl test framework is very flexable and you can do almost anything you want in it.
# here is a valid test file print "1..2\n"; print "ok 1\n"; print "ok 2\n";
So you can have as many (or as few) test files as you want, and you can test anything in those files.
Test::More is a very good test modules with lots of different funtions to test output. There might be a Test module that is designed to test scripts.
I can see 2 ways to do this. You can either use Open3 to run the script and test the output, or tie PRINT and do the script. The first is likely easier, but the second would give you some more control.
Good luck and have fun.
Update Test::Script might have some good ideas on how to test scripts.
-- gam3
A picture is worth a thousand words, but takes 200K.

In reply to Re: Embedded test by gam3
in thread Embedded test by Sixtease

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.