Perl: the Markov chain saw | |
PerlMonks |
Re: Embedded testby gam3 (Curate) |
on Mar 10, 2007 at 02:50 UTC ( [id://604097]=note: print w/replies, xml ) | Need Help?? |
The perl test framework is very flexable and you can do almost anything you want in it.
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 Section
Seekers of Perl Wisdom
|
|