Erik Wasser > Test-Filesystem > Test::Filesystem

Download:
Test-Filesystem-0.04.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  

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 (content and meta attribute). You can use it if your perl program is generating files and you don't want to compare the test results file by file.

PUBLIC INTERFACE ^

cmp_filesystem( {OPTIONS}, GOT_ROOT_DIR_PATH, EXPECTED_ROOT_DIR_PATH, NAME )

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

In the current implementation we compare the following attributes:

1. files and directories

Location relative to the given root directory. No symlinks or special files will be checked.

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.

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.

syntax highlighting: