[Israel.pm] Using perl as unit-testing framework
gordon at cshl.edu
Sun Nov 22 15:34:50 PST 2009
I have a package of command line programs (written in c/c++) and I want to add unit-testing to it.
It uses the gnu autotools, and I'd like users to be able to run "make check" to run the tests.
I'm sure similar things have been done countless of times (probably using Perl).
Do you have any recommendation on where to start ?
Important features are:
1. minimum end-user requirements (preferably - will not require them to install modules with CPAN)
2. Set command line arguments and STDIN, check STDOUT, STDERR and exitcode (and of course segfaults and signals).
3. relatively easy to implement
If the answer is RTFM, please point me to a good FM (for example, the main wiki for TAP has a lot of information, except starting examples for just two languages: C++ and PERL.... http://testanything.org/wiki/index.php/Testing_with_TAP )
More information about the Perl