Subject: | Test::File::Contents suggestion |
Date: | 23 Nov 2007 15:38:18 +0000 |
To: | bug-test-file-contents [...] rt.cpan.org |
From: | zardoz <zardoz [...] infoserve.net> |
Hi,
Nice file testing module. I've been using a hand rolled function
filtered_compare_files() for years. You might like to add something
like this to your module.
Basically it does an exact file comparison but allows you to pass
a filtering function so that things like dates and such can be
replaced with YYYYMMDD for example so that the comparisons ignore
the date the test plan was run.
Perhaps:
file_contents_identical(
$file1,
$file2,
$rcFilterSub,
$test_description);
Example usage
file_contents_identical(
'got.txt',
'expected.txt',
sub {},
'compare files ignoring dates');