[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#609205: ITP: libtest-file-contents-perl -- Perl module for testing the contents of files



On Sat, Jan 08, 2011 at 02:23:15PM +0200, Damyan Ivanov wrote:
> -=| Alessandro Ghedini, Fri, Jan 07, 2011 at 12:20:00PM +0100 |=-
> > Package: wnpp
> > * Package name    : libtest-file-contents-perl
> > * URL             : http://search.cpan.org/dist/Test-File-Contents/
> >   Description     : Perl module for testing the contents of files
> > 
> > Test::File::Contents provides a set of routines useful to construct
> > tests that examine the content of files.
> > 
> > It can check for an exact match and for a regexp match against the file's
> > contents, but also if the file's contents do not match a string or a
> > regexp and whether a file matches or not a given md5sum.
> 
> Is that module able to test if the contents of a given file match the 
> contents of another file? 

Yes. Look at the file_contents_identical() subroutine.

> Bonus points if if shows a unified diff in case of mismatch.

No bonus points I fear. But maybe someone could work it out, the code 
doesn't seem that complicated.

> That would be useful for dh-make-perl's test suite.

-- 
perl -E'$_=q;$/= @{[@_]};and s;\S+;<inidehG ordnasselA>;eg;say~~reverse'



Reply to: