1Test::Portability::FileUss(e3r)Contributed Perl DocumentTaetsito:n:Portability::Files(3)
2
3
4

NAME

6       Test::Portability::Files - Check file names portability
7

VERSION

9       Version 0.05
10

SYNOPSIS

12           use Test::More;
13           eval "use Test::Portability::Files";
14           plan skip_all => "Test::Portability::Files required for testing filenames portability" if $@;
15           options(all_tests => 1);  # to be hyper-strict
16           run_tests();
17

DESCRIPTION

19       This module is used to check the portability across operating systems
20       of the names of the files present in the distribution of a module.  The
21       tests use the advices given in "Files and Filesystems" in perlport.
22       The author of a distribution can select which tests to execute.
23
24       To use this module, simply copy the code from the synopsis in a test
25       file named t/portfs.t for example, and add it to your MANIFEST.  You
26       can delete the call to "options()" to enable only most common tests.
27
28       By default, not all tests are enabled because some are judged too
29       cumbersome to be practical, especially since some of the most limited
30       platforms (like MS-DOS) seem to be no longer supported.  Here are the
31       default options:
32
33       ·   "use_file_find" is not enabled (check only the names as listed in
34           MANIFEST)
35
36       ·   "test_amiga_length" is enabled
37
38       ·   "test_ansi_chars" is enabled
39
40       ·   "test_case" is enabled
41
42       ·   "test_dos_length" is not enabled
43
44       ·   "test_mac_length" is enabled
45
46       ·   "test_one_dot" is enabled
47
48       ·   "test_space" is enabled
49
50       ·   "test_special_chars" is enabled
51
52       ·   "test_symlink" is enabled
53
54       ·   "test_vms_length" is enabled
55
56       To change any option, please see "options()".
57

EXPORT

59       The following functions are exported:
60
61       ·   "options()"
62
63       ·   "run_tests()"
64

FUNCTIONS

66       "options()"
67           Set the module options, in particular, select which tests to
68           execute.  Expects a hash.
69
70           General options
71
72           ·   "use_file_find" - set to 1 to check all the files in the
73               current hierarchy using "File::Find" instead of only checking
74               files listed in MANIFEST.
75
76           Tests
77
78           ·   "all_tests" - select all tests.
79
80           ·   "test_amiga_length" - check that the name fits within AmigaOS
81               name length limitations (107 characters).
82
83           ·   "test_ansi_chars" - check that the name only uses the portable
84               filename characters as defined by ANSI C and recommended by
85               perlport.
86
87           ·   "test_case" - check that the name of the file does not clash
88               with the name of another file on case-insensitive filesystems.
89
90           ·   "test_dir_noext" - check that the directory has no extension.
91
92           ·   "test_dos_length" - check that the name fits within DOS name
93               length limitations (8 characters max for the base name, 3
94               characters max for the extension).
95
96           ·   "test_mac_length" - check that the name fits within Mac OS
97               Classic name length limitations (31 characters).
98
99           ·   "test_one_dot" - check that the name only has one dot.
100
101           ·   "test_space" - check that the name has nos space.
102
103           ·   "test_special_chars" - check that the name does not use special
104               characters.
105
106           ·   "test_symlink" - check that the file is not a symbolic link.
107
108           ·   "test_vms_length" - check that the name fits within VMS name
109               length limitations (39 characters max for the base name, 39
110               characters max for the extension).
111
112           Example
113
114               options(use_file_find => 1, all_tests => 1);
115
116           selects all tests and runs them against all files found using
117           "File::Find".
118
119       "test_name_portability()"
120           Test the portability of the given file name.
121
122       "run_tests()"
123           Execute the tests selected by "options()".
124

SEE ALSO

126       perlport
127

AUTHOR

129       Sebastien Aperghis-Tramoni, <sebastien@aperghis.net>
130

BUGS

132       Please report any bugs or feature requests to
133       "bug-test-portability-files@rt.cpan.org", or through the web interface
134       at <http://rt.cpan.org>.  I will be notified, and then you'll
135       automatically be notified of progress on your bug as I make changes.
136
138       Copyright 2004 Sebastien Aperghis-Tramoni, All Rights Reserved.
139
140       This program is free software; you can redistribute it and/or modify it
141       under the same terms as Perl itself.
142
143
144
145perl v5.16.3                      2004-11-21       Test::Portability::Files(3)
Impressum