Welcome to the Monastery | |
PerlMonks |
Re: How to unit test a script packaged in a module distribution?by samtregar (Abbot) |
on Apr 27, 2007 at 19:21 UTC ( [id://612444]=note: print w/replies, xml ) | Need Help?? |
You could abstract out the code in the script into a module with a single method call - i.e. run(). Then you could write tests which setup @ARGV and call run() to simulate running the script.
Alternately, you could make the script tests skip when they're running on Windows, but perhaps there are other OSes that can't easily execute scripts. -sam
In Section
Seekers of Perl Wisdom
|
|