1Test::File::Contents(3)User Contributed Perl DocumentatioTnest::File::Contents(3)
2
3
4

NAME

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

VERSION

10       Version 0.05
11

SYNOPSIS

13           use Test::File::Contents;
14
15           file_contents_is       ($file,  $string,  $test_description);
16           file_contents_like     ($file,  qr/foo/,  $test_description);
17           file_md5sum            ($file,  $md5sum,  $test_description);
18           file_contents_identical($file1, $file2,   $test_description);
19

FUNCTIONS

21   file_contents_is
22       Checks for an exact match on the file's contents. Pass in a Unix-style
23       file name and it will be converted for the local file system.
24
25       Note: performs a dumb "eq" comparison, sucking the whole file into
26       memory.
27
28       Also note: I am aware of the grammatical confusion in the function name
29       - got a better suggestion?
30
31   file_contents_isnt
32       Checks that the file's contents do not match a string. Pass in a Unix-
33       style file name and it will be converted for the local file system.
34
35       Note: performs a dumb "ne" comparison, sucking the whole file into
36       memory.
37
38       Also note: I am aware of the grammatical confusion in the function name
39       - got a better suggestion?
40
41   file_contents_like
42       Checks for a regexp match against the file's contents. You must provide
43       it with a qr// style regexp. Pass in a Unix-style file name and it will
44       be converted for the local file system.
45
46   file_contents_unlike
47       Checks for a regexp failed match against the file's contents. You must
48       provide it with a qr// style regexp. Pass in a Unix-style file name and
49       it will be converted for the local file system.
50
51   file_md5sum
52       Checks whether a file matches a given md5sum. The md5sum should be
53       provided as a hex string, eg. "6df23dc03f9b54cc38a0fc1483df6e21". Pass
54       in a Unix-style file name and it will be converted for the local file
55       system.
56
57   file_contents_identical
58       Tests that the contents of two files are identical. Pass in a Unix-
59       style file name and it will be converted for the local file system.
60

AUTHOR

62       Kirrily Robert, "<skud@cpan.org>"
63
64       Contributors:
65
66       David Wheeler, "<dwheeler@cpan.org>"
67

BUGS

69       Please report any bugs or feature requests to
70       "bug-test-file-contents@rt.cpan.org", or through the web interface at
71       <http://rt.cpan.org>.  I will be notified, and then you'll
72       automatically be notified of progress on your bug as I make changes.
73
75       Copyright 2004-2005 Kirrily Robert.
76
77       This program is free software; you can redistribute it and/or modify it
78       under the same terms as Perl itself.
79
80
81
82perl v5.12.0                      2010-05-06           Test::File::Contents(3)
Impressum