Test::Portability::Files(3pm) | User Contributed Perl Documentation | Test::Portability::Files(3pm) |
Test::Portability::Files - Check file names portability
version 0.10
use Test::More; plan skip_all => "Only for the module maintainer" unless $ENV{AUTHOR_TESTS}; plan skip_all => "Test::Portability::Files required for testing filenames portability" unless eval "use Test::Portability::Files; 1"; options(all_tests => 1); # to be hyper-strict run_tests();
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 execute.
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:
To change any option, please see "options()".
The following functions are exported:
General options
Tests
"test_windows_reserved" - check that the file name is not one of the reserved Windows filenames that correspond to character devices, such as con or com1.
Example
options(use_file_find => 1, all_tests => 1);
selects all tests and runs them against all files found using "File::Find".
perlport
The development version is on github at <https://https://github.com/abraxxa/Test-Portability-Files> and may be cloned from <git://https://github.com/abraxxa/Test-Portability-Files.git>
Please report any bugs or feature requests on the bugtracker website <https://rt.cpan.org/Dist/Display.html?Queue=Test-Portability-Files> or by email to bug-test-portability-files@rt.cpan.org <mailto:bug-test-portability-files@rt.cpan.org>.
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
This software is copyright (c) 2019 by Sébastien Aperghis-Tramoni, Alexander Hartmaier.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
2019-01-11 | perl v5.28.1 |