NAME
Test::Files - A Test::Builder based module to ease testing with files and dirs
SYNOPSIS
use Test::More tests => 5;
use Test::Files;
file_ok("path/to/some/file", "contents\nof\file", "some file");
compare_ok("path/to/a/file", "path/to/correct/file", "they're the same");
dir_contains_ok ( "some/dir", [qw(files some/dir should contain)] );
dir_only_contains_ok( "some/dir", [qw(files some/dir should contain)] );
compare_dirs_ok("some/dir", "some/other/dir/with/exactly/the/same/stuff");
ABSTRACT
Test::Builder based test helper which helps you test files and their contents
Future versions will likely work on directories too.
DESCRIPTION
This module is like Test::More, in fact you should use that first as shown above. It exports file_ok and compare_ok which compare the contents of a file to a string or to another file.
Though the SYNOPSIS examples don't all have names, you can and should provide a name for each test. Names are omitted above only to reduce clutter and line widths.
EXPORT
file_ok compare_ok dir_contains_ok
DEPENDENCIES
Test::Builder Test::More Test::Differences
SEE ALSO
Consult Test::Simple, Test::More, and Test::Builder for more testing help. This module really just adds functions to what Test::More does.
AUTHOR
Phil Crow, <philcrow2000@yahoo.com<gt>
COPYRIGHT AND LICENSE
Copyright 2003 by Phil Crow
This library is free software; you can redistribute it and/or modify it under the same terms as Perl 5.8.1 itself.