in reply to Re^2: using Test::* modules for generic testing of non perl stuff?
in thread using Test::* modules for generic testing of non perl stuff?
I used the word "misuse" because I think that the Test::* modules were originally used for testing code, and I've adapted them to some orthogonal uses.
At it's most fundamental, you just need to define a set of "things" you want to test and define their acceptable output. This can be tricky, as you might need to define a range of acceptable output values. One strategy that I've used in the past is to predefine a hash like this:
Then execute the commands and test the dynamic output against the predefined output.%commands = { $cmd1 => $output1, ... };
I've actually got to run and catch a plane, but I'll be sure to check on this thread when I get back. Cheers. :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: using Test::* modules for generic testing of non perl stuff?
by jfroebe (Parson) on Oct 15, 2004 at 21:21 UTC |
In Section
Seekers of Perl Wisdom