Testing a command from Perl and checking content of a file
- by justintime
I want to test a script I have written in Perl and specifically check what output it writes to file. I wrote it some time ago and don't want to modify it to the extent of turning it into a module but would like to regression test it before adding some small functional changes.
So far I have
use Test::Command tests = 10;
exit_is_num($cmd, 0);
....
But the command produces some files and I want to check those files are the same as I expect (either equal or match some regexp).
Any suggestions