More on testing Perl applications
Posted by Alec The Geek on 9 January 2007
A few weeks ago I said
As far as I can tell all, of the current CPAN testing frameworks are designed to test Perl Modules (.pm files). Because of this they are designed to be consumers of the services provided by the modules under test.
It turns out of course that the test framework can be used with a Perl application. It is nessasry to imbed the tests directly in the code. The following simple, but complete, example is taken from Perl Testing: A Developers’s Notebook.
use Test::Simple tests =>1;
return "Hello, world!";
ok( hello_world( ) eq "Hello, world!" );
Blogged with Flock
Sorry, the comment form is closed at this time.