CentOS 7.0 - man page for test::portability::files (centos section 3)
|Linux & Unix Commands - Search Man Pages
Test::Portability::Files(3) User Contributed Perl Documentation Test::Portability::Files(3)
Test::Portability::Files - Check file names portability
eval "use Test::Portability::Files";
plan skip_all => "Test::Portability::Files required for testing filenames portability" if $@;
options(all_tests => 1); # to be hyper-strict
This module is used to check the portability across operating systems of the names of the
files present in the distribution of a module. The tests use the advices given in "Files
and Filesystems" in perlport. The author of a distribution can select which tests to
To use this module, simply copy the code from the synopsis in a test file named t/portfs.t
for example, and add it to your MANIFEST. You can delete the call to "options()" to
enable only most common tests.
By default, not all tests are enabled because some are judged too cumbersome to be
practical, especially since some of the most limited platforms (like MS-DOS) seem to be no
longer supported. Here are the default options:
o "use_file_find" is not enabled (check only the names as listed in MANIFEST)
o "test_amiga_length" is enabled
o "test_ansi_chars" is enabled
o "test_case" is enabled
o "test_dos_length" is not enabled
o "test_mac_length" is enabled
o "test_one_dot" is enabled
o "test_space" is enabled
o "test_special_chars" is enabled
o "test_symlink" is enabled
o "test_vms_length" is enabled
To change any option, please see "options()".
The following functions are exported:
Set the module options, in particular, select which tests to execute. Expects a hash.
o "use_file_find" - set to 1 to check all the files in the current hierarchy using
"File::Find" instead of only checking files listed in MANIFEST.
o "all_tests" - select all tests.
o "test_amiga_length" - check that the name fits within AmigaOS name length
limitations (107 characters).
o "test_ansi_chars" - check that the name only uses the portable filename characters
as defined by ANSI C and recommended by perlport.
o "test_case" - check that the name of the file does not clash with the name of
another file on case-insensitive filesystems.
o "test_dir_noext" - check that the directory has no extension.
o "test_dos_length" - check that the name fits within DOS name length limitations (8
characters max for the base name, 3 characters max for the extension).
o "test_mac_length" - check that the name fits within Mac OS Classic name length
limitations (31 characters).
o "test_one_dot" - check that the name only has one dot.
o "test_space" - check that the name has nos space.
o "test_special_chars" - check that the name does not use special characters.
o "test_symlink" - check that the file is not a symbolic link.
o "test_vms_length" - check that the name fits within VMS name length limitations
(39 characters max for the base name, 39 characters max for the extension).
options(use_file_find => 1, all_tests => 1);
selects all tests and runs them against all files found using "File::Find".
Test the portability of the given file name.
Execute the tests selected by "options()".
Sebastien Aperghis-Tramoni, <firstname.lastname@example.org>
Please report any bugs or feature requests to "email@example.com", 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 Sebastien Aperghis-Tramoni, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same
terms as Perl itself.
perl v5.16.3 2004-11-21 Test::Portability::Files(3)
All times are GMT -4. The time now is 11:20 AM.