Alex Skud Bayley > Test-File-Contents-0.05 > Test::File::Contents

Download:
Test-File-Contents-0.05.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  10
Open  1
View/Report Bugs
Module Version: 0.05   Source   Latest Release: Test-File-Contents-0.21

NAME ^

Test::File::Contents - Test routines for examining the contents of files

VERSION ^

Version 0.05

SYNOPSIS ^

    use Test::File::Contents;

    file_contents_is       ($file,  $string,  $test_description);
    file_contents_like     ($file,  qr/foo/,  $test_description);
    file_md5sum            ($file,  $md5sum,  $test_description);
    file_contents_identical($file1, $file2,   $test_description);

FUNCTIONS ^

file_contents_is

Checks for an exact match on the file's contents. Pass in a Unix-style file name and it will be converted for the local file system.

Note: performs a dumb "eq" comparison, sucking the whole file into memory.

Also note: I am aware of the grammatical confusion in the function name - got a better suggestion?

file_contents_isnt

Checks that the file's contents do not match a string. Pass in a Unix-style file name and it will be converted for the local file system.

Note: performs a dumb "ne" comparison, sucking the whole file into memory.

Also note: I am aware of the grammatical confusion in the function name - got a better suggestion?

file_contents_like

Checks for a regexp match against the file's contents. You must provide it with a qr// style regexp. Pass in a Unix-style file name and it will be converted for the local file system.

file_contents_unlike

Checks for a regexp failed match against the file's contents. You must provide it with a qr// style regexp. Pass in a Unix-style file name and it will be converted for the local file system.

file_md5sum

Checks whether a file matches a given md5sum. The md5sum should be provided as a hex string, eg. "6df23dc03f9b54cc38a0fc1483df6e21". Pass in a Unix-style file name and it will be converted for the local file system.

file_contents_identical

Tests that the contents of two files are identical. Pass in a Unix-style file name and it will be converted for the local file system.

AUTHOR ^

Kirrily Robert, <skud@cpan.org>

Contributors:

David Wheeler, <dwheeler@cpan.org>

BUGS ^

Please report any bugs or feature requests to bug-test-file-contents@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

COPYRIGHT & LICENSE ^

Copyright 2004-2005 Kirrily Robert.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: