Fix tests
[catagits/Test-EOL.git] / README
CommitLineData
a83ae797 1NAME
2 Test::EOL - Check the correct line endings in your project
3
4SYNOPSIS
5 "Test::EOL" lets you check the presence of tabs in your perl code. It
6 report its results in standard "Test::Simple" fashion:
7
8 use Test::EOL tests => 1;
9 eol_unix_ok( 'lib/Module.pm', 'Module is tab free');
10
11 Module authors can include the following in a t/eol.t and have
12 "Test::EOL" automatically find and check all perl files in a module
13 distribution:
14
15 use Test::EOL;
16 all_perl_files_ok();
17
18 or
19
20 use Test::EOL;
21 all_perl_files_ok( @mydirs );
22
23DESCRIPTION
24 This module scans your project/distribution for any perl files (scripts,
25 modules, etc) for the presence of tabs.
26
27EXPORT
28 A list of functions that can be exported. You can delete this section if
29 you don't export anything, such as for a purely object-oriented module.
30
31FUNCTIONS
32 all_perl_files_ok( [ @directories ] )
33 Applies "eol_unix_ok()" to all perl files found in @directories (and sub
34 directories). If no <@directories> is given, the starting point is one
35 level above the current running script, that should cover all the files
36 of a typical CPAN distribution. A perl file is *.pl or *.pm or *.t or a
37 file starting with "#!...perl"
38
39 If the test plan is defined:
40
41 use Test::EOL tests => 3;
42 all_perl_files_ok();
43
44 the total number of files tested must be specified.
45
46 eol_unix_ok( $file [, $text] )
47 Run a unix EOL check on $file. For a module, the path (lib/My/Module.pm)
48 or the name (My::Module) can be both used.
49
50AUTHOR
51 Tomas Doran (t0m) "<bobtfish@bobtfish.net>"
52
53BUGS
54 Testing for EOL styles other than unix (\n) currently unsupported.
55
56 The source code can be found on github, as listed in " META.yml ",
57 patches are welcome.
58
59 Otherwise please report any bugs or feature requests to "bug-test-eol at
60 rt.cpan.org", or through the web interface at
61 <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-EOL>. I will be
62 notified, and then you'll automatically be notified of progress on your
63 bug as I make changes.
64
65ACKNOWLEDGEMENTS
66 Shamelessly ripped off from Test::NoTabs.
67
68SEE ALSO
69 Test::More, Test::Pod. Test::Distribution, <Test:NoWarnings>,
70 Test::NoTabs, Module::Install::AuthorTests.
71
72COPYRIGHT & LICENSE
73 Copyright 2009 Tomas Doran, some rights reserved.
74
75 This program is free software; you can redistribute it and/or modify it
76 under the same terms as Perl itself.
77