The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Test::Filesystem - Tester for filesystem content

SYNOPSIS

  use Test::Testfilesystem tests => 1;

  cmp_filesystem($got_root_dir, $expected_root_dir, $test_name);
  # or
  cmp_filesystem( { OPTIONS }, $got_root_dir, $expected_root_dir, $test_name);

DESCRIPTION

This test framework compare filesystems. You can use it your perl programs are generating filesystems parts and you don't want to compare file by file.

In the current implementation we compare the following attributes:

PUBLIC INTERFACE

cmp_filesystem( {OPTIONS}, GOT, EXPECTED, NAME )

Compares the two given filesystems: GOT/ and EXPECTED/. OPTIONS are unsupported yet.

1. files and directories
    (location relative to the given root directory)
2. stat attributes

stat() attributes without dev, ctime, blksize, blocks and ino inode number.

3. file content.

Doing the MD5 dance with every file.

We're not checking the root directory itself, only the content of it. So if the mtime from /a and /b differs, it will checked.

Special files are not handled (yet).

EXPORT

cmp_filesystems by default.

TODO

Support for .tar.gz.
Support for filelists (instead a giving a root directory)

Got ideas? Send them to me.

AUTHOR

Erik Wasser, <fuzz at namm.de>

BUGS

Please report any bugs or feature requests to bug-test-filesystem at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Filesystem. I will be n otified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Test::Filesystem

You can also look for information at:

SEE ALSO

perl.