Test-Fixme-0.15/0000755000175000017500000000000012553047761013002 5ustar ollisgollisgTest-Fixme-0.15/lib/0000755000175000017500000000000012553047761013550 5ustar ollisgollisgTest-Fixme-0.15/lib/Test/0000755000175000017500000000000012553047761014467 5ustar ollisgollisgTest-Fixme-0.15/lib/Test/Fixme.pm.bak0000644000175000017500000001571112553047761016636 0ustar ollisgollisgpackage Test::Fixme; require 5.006002; use strict; use warnings; use Carp; use File::Find; use ExtUtils::Manifest qw( maniread ); use Test::Builder; require Exporter; our @ISA = qw( Exporter ); our @EXPORT = qw( run_tests ); # ABSTRACT: Check code for FIXMEs. # VERSION my $Test = Test::Builder->new; sub run_tests { # Get the values and setup defaults if needed. my %args = @_; $args{match} = 'FIXME' unless defined $args{match} && length $args{match}; $args{where} = '.' unless defined $args{where} && length $args{where}; $args{warn} = 0 unless defined $args{warn} && length $args{warn}; $args{filename_match} = qr/./ unless defined $args{filename_match} && length $args{filename_match}; my $first = 1; # Skip all tests if instructed to. $Test->skip_all("All tests skipped.") if $args{skip_all}; # Get files to work with and set the plan. my @files; if(defined $args{manifest}) { @files = keys %{ maniread( $args{manifest} ) }; } else { @files = list_files( $args{where}, $args{filename_match} ); } $Test->plan( tests => scalar @files ); # Check ech file in turn. foreach my $file (@files) { my $results = scan_file( file => $file, match => $args{match} ); my $ok = scalar @$results == 0; $Test->ok($ok || $args{warn}, "'$file'"); next if $ok; $Test->diag('') if $first++; $Test->diag(format_file_results($results)); } } sub scan_file { my %args = @_; return undef unless $args{file} && $args{match}; # Get the contents of the files and split content into lines. my $content = load_file( $args{file} ); my @lines = split $/, $content; my $line_number = 0; # Set up return array. my @results = (); foreach my $line (@lines) { $line_number++; next unless $line =~ m/$args{match}/; # We have a match - add it to array. push @results, { file => $args{file}, match => $args{match}, line => $line_number, text => $line, }; } return \@results; } sub format_file_results { my $results = shift; return undef unless defined $results; my $out = ''; # format the file name. $out .= "File: '" . ${$results}[0]->{file} . "'\n"; # format the results. foreach my $result (@$results) { my $line = $$result{line}; my $txt = " $line"; $txt .= ' ' x ( 8 - length $line ); $txt .= $$result{text} . "\n"; $out .= $txt; } return $out; } sub list_files { my $path_arg = shift; croak 'You must specify a single directory, or reference to a list of directories' unless defined $path_arg; my $filename_match = shift; if ( !defined $filename_match ) { # Filename match defaults to matching any single character, for # backwards compatibility with one-arg list_files() invocation $filename_match = qr/./; } my @paths; if ( ref $path_arg eq 'ARRAY' ) { # Ref to array @paths = @{$path_arg}; } elsif ( ref $path_arg eq '' ) { # one path @paths = ($path_arg); } else { # something else croak 'Argument to list_files must be a single path, or a reference to an array of paths'; } foreach my $path (@paths) { # Die if we got a bad dir. croak "'$path' does not exist" unless -e $path; } my @files; find( { preprocess => sub { # no GIT, Subversion or CVS directory contents grep !/^(.git|.svn|CVS)$/, @_, }, wanted => sub { push @files, $File::Find::name if -f $File::Find::name; }, no_chdir => 1, }, @paths ); @files = sort # sort the files grep { m/$filename_match/ } grep { !-l $_ } # no symbolic links @files; return @files; } sub load_file { my $filename = shift; # If the file is not regular then return undef. return undef unless -f $filename; # Slurp the file. open(my $fh, '<', $filename) || croak "error reading $filename $!"; my $content = do { local $/; <$fh> }; close $fh; return $content; } 1; __END__ =head1 SYNOPSIS # In a test script like 't/test-fixme.t' use Test::Fixme; run_tests(); # You can also tailor the behaviour. use Test::Fixme; run_tests( where => 'lib', # where to find files to check match => 'TODO', # what to check for skip_all => $ENV{SKIP} # should all tests be skipped ); =head1 DESCRIPTION When coding it is common to come up against problems that need to be addressed but that are not a big deal at the moment. What generally happens is that the coder adds comments like: # FIXME - what about windows that are bigger than the screen? # FIXME - add checking of user privileges here. L allows you to add a test file that ensures that none of these get forgotten in the module. =head1 METHODS =head2 run_tests By default run_tests will search for 'FIXME' in all the files it can find in the project. You can change these defaults by using 'where' or 'match' as follows: run_tests( where => 'lib', # just check the modules. match => 'TODO' # look for things that are not done yet. ); =over 4 =item where Specifies where to search for files. This can be a scalar containing a single directory name, or it can be a list reference containing multiple directory names. =item match Expression to search for within the files. This may be a simple string, or a qr//-quoted regular expression. For example: match => qr/[T]ODO|[F]IXME|[B]UG/, =item filename_match Expression to filter file names. This should be a qr//-quoted regular expression. For example: match => qr/\.(:pm|pl)$/, would only match .pm and .pl files under your specified directory. =item manifest Specifies the name of your MANIFEST file which will be used as the list of files to test instead of I or I. manifest => 'MANIFEST', =item warn Do not fail when a FIXME or other pattern is matched. Tests that would have been failures will still issue a diagnostic that will be viewed when you run C without C<-v>, C or C<./Build test>. =back =head1 HINTS If you want to match something other than 'FIXME' then you may find that the test file itself is being caught. Try doing this: run_tests( match => 'TO'.'DO' ); You may also wish to suppress the tests - try this: use Test::Fixme; run_tests( skip_all => $ENV{SKIP_TEST_FIXME} ); You can only run run_tests once per file. Please use several test files if you want to run several different tests. =head1 SEE ALSO L =head1 ACKNOWLEDGMENTS Dave O'Neill added support for 'filename_match' and also being able to pass a list of several directories in the 'where' argument. Many thanks. =cut 1; Test-Fixme-0.15/lib/Test/Fixme.pm0000644000175000017500000002504112553047761016077 0ustar ollisgollisgpackage Test::Fixme; require 5.006002; use strict; use warnings; use Carp; use File::Find; use ExtUtils::Manifest qw( maniread ); use Test::Builder; require Exporter; our @ISA = qw( Exporter ); our @EXPORT = qw( run_tests ); # ABSTRACT: Check code for FIXMEs. our $VERSION = '0.15'; # VERSION my $Test = Test::Builder->new; sub run_tests { # Get the values and setup defaults if needed. my %args = @_; $args{match} = 'FIXME' unless defined $args{match} && length $args{match}; $args{where} = '.' unless defined $args{where} && length $args{where}; $args{warn} = 0 unless defined $args{warn} && length $args{warn}; $args{format} = $ENV{TEST_FIXME_FORMAT} if defined $ENV{TEST_FIXME_FORMAT}; $args{format} = 'original' unless defined $args{format} && $args{format} =~ /^(original|perl)$/; $args{filename_match} = qr/./ unless defined $args{filename_match} && length $args{filename_match}; my $first = 1; # Skip all tests if instructed to. $Test->skip_all("All tests skipped.") if $args{skip_all}; # Get files to work with and set the plan. my @files; if(defined $args{manifest}) { @files = keys %{ maniread( $args{manifest} ) }; } else { @files = list_files( $args{where}, $args{filename_match} ); } $Test->plan( tests => scalar @files ); # Check ech file in turn. foreach my $file (@files) { my $results = scan_file( file => $file, match => $args{match} ); my $ok = scalar @$results == 0; $Test->ok($ok || $args{warn}, "'$file'"); next if $ok; $Test->diag('') if $first++; $Test->diag(do { no strict 'refs'; &{"format_file_results_$args{format}"}($results) }); } } sub scan_file { my %args = @_; return undef unless $args{file} && $args{match}; # Get the contents of the files and split content into lines. my $content = load_file( $args{file} ); my @lines = split $/, $content; my $line_number = 0; # Set up return array. my @results = (); foreach my $line (@lines) { $line_number++; next unless $line =~ m/$args{match}/; # We have a match - add it to array. push @results, { file => $args{file}, match => $args{match}, line => $line_number, text => $line, }; } return \@results; } sub format_file_results_original { my $results = shift; return undef unless defined $results; my $out = ''; # format the file name. $out .= "File: '" . ${$results}[0]->{file} . "'\n"; # format the results. foreach my $result (@$results) { my $line = $$result{line}; my $txt = " $line"; $txt .= ' ' x ( 8 - length $line ); $txt .= $$result{text} . "\n"; $out .= $txt; } return $out; } sub format_file_results_perl { my $results = shift; return undef unless defined $results; my $out = ''; # format the results. foreach my $result (@$results) { my $file = ${$results}[0]->{file}; my $line = $$result{line}; my $text = $$result{text}; $out .= "Pattern found at $file line $line:\n $text\n"; } return $out; } sub list_files { my $path_arg = shift; croak 'You must specify a single directory, or reference to a list of directories' unless defined $path_arg; my $filename_match = shift; if ( !defined $filename_match ) { # Filename match defaults to matching any single character, for # backwards compatibility with one-arg list_files() invocation $filename_match = qr/./; } my @paths; if ( ref $path_arg eq 'ARRAY' ) { # Ref to array @paths = @{$path_arg}; } elsif ( ref $path_arg eq '' ) { # one path @paths = ($path_arg); } else { # something else croak 'Argument to list_files must be a single path, or a reference to an array of paths'; } foreach my $path (@paths) { # Die if we got a bad dir. croak "'$path' does not exist" unless -e $path; } my @files; find( { preprocess => sub { # no GIT, Subversion or CVS directory contents grep !/^(.git|.svn|CVS)$/, @_, }, wanted => sub { push @files, $File::Find::name if -f $File::Find::name; }, no_chdir => 1, }, @paths ); @files = sort # sort the files grep { m/$filename_match/ } grep { !-l $_ } # no symbolic links @files; return @files; } sub load_file { my $filename = shift; # If the file is not regular then return undef. return undef unless -f $filename; # Slurp the file. open(my $fh, '<', $filename) || croak "error reading $filename $!"; my $content = do { local $/; <$fh> }; close $fh; return $content; } 1; =pod =encoding UTF-8 =head1 NAME Test::Fixme - Check code for FIXMEs. =head1 VERSION version 0.15 =head1 SYNOPSIS # In a test script like 't/test-fixme.t' use Test::Fixme; run_tests(); # You can also tailor the behaviour. use Test::Fixme; run_tests( where => 'lib', # where to find files to check match => 'TODO', # what to check for skip_all => $ENV{SKIP} # should all tests be skipped ); =head1 DESCRIPTION When coding it is common to come up against problems that need to be addressed but that are not a big deal at the moment. What generally happens is that the coder adds comments like: # FIXME - what about windows that are bigger than the screen? # FIXME - add checking of user privileges here. L allows you to add a test file that ensures that none of these get forgotten in the module. =head1 METHODS =head2 run_tests By default run_tests will search for 'FIXME' in all the files it can find in the project. You can change these defaults by using 'where' or 'match' as follows: run_tests( where => 'lib', # just check the modules. match => 'TODO' # look for things that are not done yet. ); =over 4 =item where Specifies where to search for files. This can be a scalar containing a single directory name, or it can be a list reference containing multiple directory names. =item match Expression to search for within the files. This may be a simple string, or a qr//-quoted regular expression. For example: match => qr/[T]ODO|[F]IXME|[B]UG/, =item filename_match Expression to filter file names. This should be a qr//-quoted regular expression. For example: match => qr/\.(:pm|pl)$/, would only match .pm and .pl files under your specified directory. =item manifest Specifies the name of your MANIFEST file which will be used as the list of files to test instead of I or I. manifest => 'MANIFEST', =item warn Do not fail when a FIXME or other pattern is matched. Tests that would have been failures will still issue a diagnostic that will be viewed when you run C without C<-v>, C or C<./Build test>. =item format Specifies format to be used for display of pattern matches. =over 4 =item original The original and currently default format looks something like this: # File: './lib/Test/Fixme.pm' # 16 # ABSTRACT: Check code for FIXMEs. # 25 $args{match} = 'FIXME' unless defined $args{match} && length $args{match}; # 28 $args{format} ||= $ENV{TEST_FIXME_FORMAT}; # 228 # FIXME - what about windows that are bigger than the screen? # 230 # FIXME - add checking of user privileges here. # 239 By default run_tests will search for 'FIXME' in all the files it can # 280 Do not fail when a FIXME or other pattern is matched. Tests that would # 288 If you want to match something other than 'FIXME' then you may find # 296 run_tests( skip_all => $ENV{SKIP_TEST_FIXME} ); # 303 L With the line numbers on the left and the offending text on the right. =item perl The "perl" format is that used by Perl itself to report warnings and errors. # Pattern found at ./lib/Test/Fixme.pm line 16: # # ABSTRACT: Check code for FIXMEs. # Pattern found at ./lib/Test/Fixme.pm line 25: # $args{match} = 'FIXME' unless defined $args{match} && length $args{match}; # Pattern found at ./lib/Test/Fixme.pm line 28: # $args{format} ||= $ENV{TEST_FIXME_FORMAT}; # Pattern found at ./lib/Test/Fixme.pm line 228: # # FIXME - what about windows that are bigger than the screen? # Pattern found at ./lib/Test/Fixme.pm line 230: # # FIXME - add checking of user privileges here. # Pattern found at ./lib/Test/Fixme.pm line 239: # By default run_tests will search for 'FIXME' in all the files it can # Pattern found at ./lib/Test/Fixme.pm line 280: # Do not fail when a FIXME or other pattern is matched. Tests that would # Pattern found at ./lib/Test/Fixme.pm line 288: # If you want to match something other than 'FIXME' then you may find # Pattern found at ./lib/Test/Fixme.pm line 296: # run_tests( skip_all => $ENV{SKIP_TEST_FIXME} ); # Pattern found at ./lib/Test/Fixme.pm line 303: # L For files that contain many offending patterns it may be a bit harder to read for humans, but easier to parse for IDEs. =back You may also use the C environment variable to override either the default or the value specified in the test file. =back =head1 HINTS If you want to match something other than 'FIXME' then you may find that the test file itself is being caught. Try doing this: run_tests( match => 'TO'.'DO' ); You may also wish to suppress the tests - try this: use Test::Fixme; run_tests( skip_all => $ENV{SKIP_TEST_FIXME} ); You can only run run_tests once per file. Please use several test files if you want to run several different tests. =head1 SEE ALSO L =head1 ACKNOWLEDGMENTS Dave O'Neill added support for 'filename_match' and also being able to pass a list of several directories in the 'where' argument. Many thanks. =head1 AUTHOR Original author: Edmund von der Burg Current maintainer: Graham Ollis Eplicease@cpan.orgE Contributors: Dave O'Neill gregor herrmann Egregoa@debian.orgE =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2015 by Edmund von der Burg , Graham Ollis . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut __END__ 1; Test-Fixme-0.15/xt/0000755000175000017500000000000012553047761013435 5ustar ollisgollisgTest-Fixme-0.15/xt/release/0000755000175000017500000000000012553047761015055 5ustar ollisgollisgTest-Fixme-0.15/xt/release/pod_spelling_common.t0000644000175000017500000000130312553047761021266 0ustar ollisgollisguse strict; use warnings; use Test::More; BEGIN { plan skip_all => 'test requires Test::Pod::Spelling::CommonMistakes' unless eval q{ use Test::Pod::Spelling::CommonMistakes; 1 }; plan skip_all => 'test requires YAML' unless eval q{ use YAML qw( LoadFile ); 1 }; }; use Test::Pod::Spelling::CommonMistakes; use FindBin; use File::Spec; my $config_filename = File::Spec->catfile( $FindBin::Bin, 'release.yml' ); my $config; $config = LoadFile($config_filename) if -r $config_filename; plan skip_all => 'disabled' if $config->{pod_spelling_common}->{skip}; chdir(File::Spec->catdir($FindBin::Bin, File::Spec->updir, File::Spec->updir)); # FIXME test files in bin too. all_pod_files_ok; Test-Fixme-0.15/xt/release/pod_spelling_system.t0000644000175000017500000000233612553047761021331 0ustar ollisgollisguse strict; use warnings; use Test::More; BEGIN { plan skip_all => 'test requires Test::Spelling' unless eval q{ use Test::Spelling; 1 }; plan skip_all => 'test requires YAML' unless eval q{ use YAML; 1; }; }; use Test::Spelling; use YAML qw( LoadFile ); use FindBin; use File::Spec; my $config_filename = File::Spec->catfile( $FindBin::Bin, 'release.yml' ); my $config; $config = LoadFile($config_filename) if -r $config_filename; plan skip_all => 'disabled' if $config->{pod_spelling_system}->{skip}; chdir(File::Spec->catdir($FindBin::Bin, File::Spec->updir, File::Spec->updir)); add_stopwords(@{ $config->{pod_spelling_system}->{stopwords} }); add_stopwords(); all_pod_files_spelling_ok; __DATA__ Plicease stdout stderr stdin subref loopback username os Ollis Mojolicious plicease CPAN reinstall TODO filename filenames login callback callbacks standalone VMS hostname hostnames TCP UDP IP API MSWin32 OpenBSD FreeBSD NetBSD unencrypted WebSocket WebSockets timestamp timestamps poney BackPAN portably RedHat AIX BSD XS FFI perlish optimizations subdirectory RESTful SQLite JavaScript dir plugins munge jQuery namespace PDF PDFs usernames DBI pluggable APIs SSL JSON YAML uncommented Solaris OpenVMS URI URL CGI Test-Fixme-0.15/xt/release/pod_coverage.t0000644000175000017500000000344712553047761017707 0ustar ollisgollisguse strict; use warnings; use Test::More; BEGIN { plan skip_all => 'test requires Test::Pod::Coverage' unless eval q{ use Test::Pod::Coverage; 1 }; plan skip_all => 'test requires YAML' unless eval q{ use YAML; 1; }; }; use Test::Pod::Coverage; use YAML qw( LoadFile ); use FindBin; use File::Spec; my $config_filename = File::Spec->catfile( $FindBin::Bin, 'release.yml' ); my $config; $config = LoadFile($config_filename) if -r $config_filename; plan skip_all => 'disabled' if $config->{pod_coverage}->{skip}; chdir(File::Spec->catdir($FindBin::Bin, File::Spec->updir, File::Spec->updir)); my @private_classes; my %private_methods; push @{ $config->{pod_coverage}->{private} }, 'Alien::.*::Install::Files#Inline'; foreach my $private (@{ $config->{pod_coverage}->{private} }) { my($class,$method) = split /#/, $private; if(defined $class && $class ne '') { my $regex = eval 'qr{^' . $class . '$}'; if(defined $method && $method ne '') { push @private_classes, { regex => $regex, method => $method }; } else { push @private_classes, { regex => $regex, all => 1 }; } } elsif(defined $method && $method ne '') { $private_methods{$_} = 1 for split /,/, $method; } } my @classes = all_modules; plan tests => scalar @classes; foreach my $class (@classes) { SKIP: { my($is_private_class) = map { 1 } grep { $class =~ $_->{regex} && $_->{all} } @private_classes; skip "private class: $class", 1 if $is_private_class; my %methods = map {; $_ => 1 } map { split /,/, $_->{method} } grep { $class =~ $_->{regex} } @private_classes; $methods{$_} = 1 for keys %private_methods; my $also_private = eval 'qr{^' . join('|', keys %methods ) . '$}'; pod_coverage_ok $class, { also_private => [$also_private] }; }; } Test-Fixme-0.15/xt/release/release.yml0000644000175000017500000000061612553047761017223 0ustar ollisgollisg--- pod_spelling_system: # list of words that are spelled correctly # (regardless of what spell check thinks) stopwords: - der - von - FIXME - FIXMEs - gregor - herrmann - IDEs pod_coverage: # format is "Class#method" or "Class", regex allowed # for either Class or method. private: - Test::Fixme#(format_file_results_.*|list_files|load_file|scan_file) Test-Fixme-0.15/xt/release/version.t0000644000175000017500000000207612553047761016734 0ustar ollisgollisguse strict; use warnings; use Test::More; use FindBin (); BEGIN { plan skip_all => "test requires Test::Version 2.00" unless eval q{ use Test::Version 2.00 qw( version_all_ok ), { has_version => 1, filename_match => sub { $_[0] !~ m{/(ConfigData|Install/Files)\.pm$} }, }; 1 }; plan skip_all => "test requires Path::Class" unless eval q{ use Path::Class qw( file dir ); 1 }; plan skip_all => 'test requires YAML' unless eval q{ use YAML; 1; }; } use YAML qw( LoadFile ); use FindBin; use File::Spec; plan skip_all => "test not built yet (run dzil test)" unless -e dir( $FindBin::Bin)->parent->parent->file('Makefile.PL') || -e dir( $FindBin::Bin)->parent->parent->file('Build.PL'); my $config_filename = File::Spec->catfile( $FindBin::Bin, 'release.yml' ); my $config; $config = LoadFile($config_filename) if -r $config_filename; if($config->{version}->{dir}) { note "using dir " . $config->{version}->{dir} } version_all_ok($config->{version}->{dir} ? ($config->{version}->{dir}) : ()); done_testing; Test-Fixme-0.15/xt/release/changes.t0000644000175000017500000000111312553047761016646 0ustar ollisgollisguse strict; use warnings; use Test::More; BEGIN { plan skip_all => 'test requires Test::CPAN::Changes' unless eval q{ use Test::CPAN::Changes; 1 }; }; use Test::CPAN::Changes; use FindBin; use File::Spec; chdir(File::Spec->catdir($FindBin::Bin, File::Spec->updir, File::Spec->updir)); do { my $old = \&Test::Builder::carp; my $new = sub { my($self, @messages) = @_; return if $messages[0] =~ /^Date ".*" is not in the recommend format/; $old->($self, @messages); }; no warnings 'redefine'; *Test::Builder::carp = $new; }; changes_file_ok; done_testing; Test-Fixme-0.15/xt/release/no_tabs.t0000644000175000017500000000052312553047761016667 0ustar ollisgollisguse strict; use warnings; use Test::More; BEGIN { plan skip_all => 'test requires Test::NoTabs' unless eval q{ use Test::NoTabs; 1 }; }; use Test::NoTabs; use FindBin; use File::Spec; chdir(File::Spec->catdir($FindBin::Bin, File::Spec->updir, File::Spec->updir)); all_perl_files_ok( grep { -e $_ } qw( bin lib t Makefile.PL )); Test-Fixme-0.15/xt/release/pod.t0000644000175000017500000000047312553047761016030 0ustar ollisgollisguse strict; use warnings; use Test::More; BEGIN { plan skip_all => 'test requires Test::Pod' unless eval q{ use Test::Pod; 1 }; }; use Test::Pod; use FindBin; use File::Spec; chdir(File::Spec->catdir($FindBin::Bin, File::Spec->updir, File::Spec->updir)); all_pod_files_ok( grep { -e $_ } qw( bin lib )); Test-Fixme-0.15/xt/release/eol.t0000644000175000017500000000051012553047761016015 0ustar ollisgollisguse strict; use warnings; use Test::More; BEGIN { plan skip_all => 'test requires Test::EOL' unless eval q{ use Test::EOL; 1 }; }; use Test::EOL; use FindBin; use File::Spec; chdir(File::Spec->catdir($FindBin::Bin, File::Spec->updir, File::Spec->updir)); all_perl_files_ok(grep { -e $_ } qw( bin lib t Makefile.PL )); Test-Fixme-0.15/Makefile.PL0000644000175000017500000000205412553047761014755 0ustar ollisgollisgBEGIN { unless(eval q{ use 5.006002; 1}) { print "Perl 5.006002 or better required\n"; exit; } } # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.036. use strict; use warnings; use 5.006002; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "Check code for FIXMEs.", "AUTHOR" => "Graham Ollis ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Test-Fixme", "EXE_FILES" => [], "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.006002", "NAME" => "Test::Fixme", "PREREQ_PM" => {}, "VERSION" => "0.15", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "ExtUtils::MakeMaker" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); Test-Fixme-0.15/t/0000755000175000017500000000000012553047761013245 5ustar ollisgollisgTest-Fixme-0.15/t/dirs/0000755000175000017500000000000012553047761014206 5ustar ollisgollisgTest-Fixme-0.15/t/dirs/types/0000755000175000017500000000000012553047761015352 5ustar ollisgollisgTest-Fixme-0.15/t/dirs/types/normal.txt0000644000175000017500000000000012553047761017371 0ustar ollisgollisgTest-Fixme-0.15/t/dirs/manifest/0000755000175000017500000000000012553047761016014 5ustar ollisgollisgTest-Fixme-0.15/t/dirs/manifest/alsogood.txt0000644000175000017500000000000012553047761020352 0ustar ollisgollisgTest-Fixme-0.15/t/dirs/manifest/good.txt0000644000175000017500000000000612553047761017501 0ustar ollisgollisgokay. Test-Fixme-0.15/t/dirs/manifest/MANIFEST0000644000175000017500000000006612553047761017147 0ustar ollisgollisgt/dirs/manifest/good.txt t/dirs/manifest/alsogood.txt Test-Fixme-0.15/t/dirs/manifest/bad.txt0000644000175000017500000000001312553047761017275 0ustar ollisgollisgbad FIXME! Test-Fixme-0.15/t/dirs/deep/0000755000175000017500000000000012553047761015123 5ustar ollisgollisgTest-Fixme-0.15/t/dirs/deep/one/0000755000175000017500000000000012553047761015704 5ustar ollisgollisgTest-Fixme-0.15/t/dirs/deep/one/deep_one_a.txt0000644000175000017500000000000012553047761020511 0ustar ollisgollisgTest-Fixme-0.15/t/dirs/deep/one/deep_one_b.txt0000644000175000017500000000000012553047761020512 0ustar ollisgollisgTest-Fixme-0.15/t/dirs/deep/two/0000755000175000017500000000000012553047761015734 5ustar ollisgollisgTest-Fixme-0.15/t/dirs/deep/two/deep_two_a.txt0000644000175000017500000000000012553047761020571 0ustar ollisgollisgTest-Fixme-0.15/t/dirs/deep/two/deep_two_b.txt0000644000175000017500000000000012553047761020572 0ustar ollisgollisgTest-Fixme-0.15/t/dirs/deep/deep_a.txt0000644000175000017500000000000012553047761017067 0ustar ollisgollisgTest-Fixme-0.15/t/dirs/deep/deep_b.txt0000644000175000017500000000000012553047761017070 0ustar ollisgollisgTest-Fixme-0.15/t/dirs/normal/0000755000175000017500000000000012553047761015476 5ustar ollisgollisgTest-Fixme-0.15/t/dirs/normal/three.pm0000644000175000017500000000000012553047761017131 0ustar ollisgollisgTest-Fixme-0.15/t/dirs/normal/four.pod0000644000175000017500000000000012553047761017143 0ustar ollisgollisgTest-Fixme-0.15/t/dirs/normal/one.txt0000644000175000017500000000005112553047761017014 0ustar ollisgollisgabcdef ghijkl mnopqr stuvwx 12345 67890 Test-Fixme-0.15/t/dirs/normal/two.pl0000644000175000017500000000024312553047761016643 0ustar ollisgollisg#!/usr/bin/perl use strict; use warnings; # FIXME - this is bad (line 6). # TEST - test 1 (line 8). # TEST - test 2 (line 10). # Test - bogus test (line 12). Test-Fixme-0.15/t/format_results.t0000644000175000017500000000076012553047761016506 0ustar ollisgollisguse strict; use warnings; use Test::More tests => 3; # Load the module. use_ok 'Test::Fixme'; # Check the formating of results. my $results = Test::Fixme::scan_file( file => 't/dirs/normal/two.pl', match => 'TEST' ); ok $results, "got results to work with"; my $expected = << 'STOP'; File: 't/dirs/normal/two.pl' 8 # TEST - test 1 (line 8). 10 # TEST - test 2 (line 10). STOP is Test::Fixme::format_file_results_original($results), $expected, "check formatting"; Test-Fixme-0.15/t/check_project.t0000644000175000017500000000011612553047761016233 0ustar ollisgollisguse strict; use warnings; use Test::Fixme; run_tests( match => 'B' . 'UG' ); Test-Fixme-0.15/t/list_files.t0000644000175000017500000000601312553047761015567 0ustar ollisgollisguse strict; use warnings; use FindBin (); use File::Spec; use Test::More tests => 14; # Load the module. use_ok 'Test::Fixme'; { # Check that listing a directory that does not exist dies. local $SIG{__WARN__} = sub { 1 }; eval { my @files = Test::Fixme::list_files('t/i/do/not/exist'); }; ok $@, 'list_files died'; ok $@ =~ m:^'t/i/do/not/exist' does not exist:, "check that non-existent directory causes 'die'"; } { # Test that sub croaks unless a path is passed. local $SIG{__WARN__} = sub { 1 }; eval { my @files = Test::Fixme::list_files(); }; ok $@, 'list_files died'; like $@, qr{^You must specify a single directory, or reference to a list of directories}, "check that no directory causes 'die'"; } { # Test the list_files function. my $dir = 't/dirs/normal'; my @files = Test::Fixme::list_files($dir); my @wanted = sort map { "$dir/$_" } qw( one.txt two.pl three.pm four.pod ); is_deeply( \@files, \@wanted, "check correct files returned from '$dir'" ); } { # Check that the search descends into sub folders. my $dir = 't/dirs/deep'; my @files = Test::Fixme::list_files($dir); my @wanted = sort map { "$dir/$_" } map { "$_.txt" } qw'deep_a deep_b one/deep_one_a one/deep_one_b two/deep_two_a two/deep_two_b'; is_deeply( \@files, \@wanted, "check correct files returned from '$dir'" ); } { # Check that we can scan a reference to a list of dirnames my @dirs = qw( t/dirs/normal t/dirs/deep/one ); my @files = Test::Fixme::list_files( \@dirs ); my @wanted = sort qw(t/dirs/deep/one/deep_one_a.txt t/dirs/deep/one/deep_one_b.txt ), map { "t/dirs/normal/$_" } qw( one.txt two.pl three.pm four.pod ); is_deeply( \@files, \@wanted, "check correct files returned from " . join( ', ', @dirs ) ); } { # Test the list_files function with a filename_match regex my $dir = 't/dirs/normal'; my @files = Test::Fixme::list_files( $dir, qr/\.(?:pl|pm)$/ ); my @wanted = sort map { "$dir/$_" } qw( two.pl three.pm ); is_deeply( \@files, \@wanted, "check correct files returned from '$dir'" ); } SKIP: { # Check that non files do not get returned. skip( "cannot create symlink", 4 ) unless eval { symlink( "", "" ); 1 }; my $dir = "t/dirs/types"; my $target = "normal.txt"; my $target_file = "$dir/$target"; my $symlink = "$dir/symlink"; # Make a symbolic link ok symlink( $target, $symlink ), "create symlinked file"; ok -e $symlink, "symlink now exists"; my @files = Test::Fixme::list_files($dir); my @wanted = ($target_file); is_deeply( \@files, \@wanted, "check that non files are not returned from '$dir'" ); ok unlink($symlink), "delete symlinked file"; } { # Test that you can pass in just a file my @list = eval { Test::Fixme::list_files(File::Spec->catfile($FindBin::Bin, 'dirs', 'normal', 'three.pm')) }; diag $@ if $@; like $list[0], qr{three.pm$}, "can give list_files directories or files"; }Test-Fixme-0.15/t/test-fixme.t0000644000175000017500000000014112553047761015513 0ustar ollisgollisguse strict; use warnings; use Test::More tests => 1; # Load the module. use_ok 'Test::Fixme'; Test-Fixme-0.15/t/load_file.t0000644000175000017500000000112512553047761015347 0ustar ollisgollisguse strict; use warnings; use Test::More tests => 4; # Load the module. use_ok 'Test::Fixme'; { # Test loading of simple file. my $content = Test::Fixme::load_file('t/dirs/normal/one.txt'); my $expected = "abcdef\nghijkl\nmnopqr\nstuvwx\n\n12345\n67890\n"; is $content, $expected, "check simple file"; } { # Test loading of non-existent file. ok !defined Test::Fixme::load_file('t/i/do/not/exist'), "load non-existent file"; } { # Test loading of a zero length file is Test::Fixme::load_file('t/dirs/normal/four.pod'), '', "load zero length file"; } Test-Fixme-0.15/t/00_diag.txt0000644000175000017500000000002412553047761015205 0ustar ollisgollisgExtUtils::MakeMaker Test-Fixme-0.15/t/scan_file.t0000644000175000017500000000307412553047761015361 0ustar ollisgollisguse strict; use warnings; use Test::More tests => 7; # Load the module. use_ok 'Test::Fixme'; { # Check that bad input is not accepted. ok !defined Test::Fixme::scan_file(), "no input"; ok !defined Test::Fixme::scan_file( match => 'TEST' ), "no match"; ok !defined Test::Fixme::scan_file( file => 't/dirs/normal/one.txt' ), "no file"; } { # Scan an empty file to get an empty arrayref. my $arrayref = Test::Fixme::scan_file( file => 't/dirs/normal/four.pod', match => 'TEST' ); ok eq_array( $arrayref, [] ), "empty file, empty array"; } { # Scan a file where there should be one hit. my $arrayref = Test::Fixme::scan_file( file => 't/dirs/normal/one.txt', match => 'ijk' ); my $expected = [ { line => 2, text => "ghijkl", file => 't/dirs/normal/one.txt', match => 'ijk' } ]; ok eq_array( $arrayref, $expected ), "find one result"; } { # scan file that should have several hits. my $arrayref = Test::Fixme::scan_file( file => 't/dirs/normal/two.pl', match => 'TEST' ); my $expected = [ { match => 'TEST', file => 't/dirs/normal/two.pl', line => 8, text => "# TEST - test 1 (line 8)." }, { match => 'TEST', file => 't/dirs/normal/two.pl', line => 10, text => "# TEST - test 2 (line 10)." }, ]; ok eq_array( $arrayref, $expected ), "find two results"; } Test-Fixme-0.15/t/manifest.t0000644000175000017500000000021412553047761015235 0ustar ollisgollisguse strict; use warnings; use Test::Fixme; use File::Spec; run_tests( manifest => File::Spec->catfile(qw( t dirs manifest MANIFEST )) ); Test-Fixme-0.15/t/skip_all.t0000644000175000017500000000007212553047761015227 0ustar ollisgollisguse strict; use Test::Fixme; run_tests( skip_all => 1 ); Test-Fixme-0.15/t/skip_git.t0000644000175000017500000000114612553047761015245 0ustar ollisgollisguse strict; use warnings; use Test::More tests => 2; use File::Temp qw( tempdir ); use Test::Fixme; my $dir = tempdir( CLEANUP => 1 ); foreach my $subdir (qw( .git .svn CVS )) { mkdir(File::Spec->catdir($dir, $subdir)); open(my $fh, '>', File::Spec->catfile($dir, $subdir, 'bad.txt')); close $fh; } mkdir(File::Spec->catdir($dir, 'foo.svn.gitSVNbar')); open(my $fh, '>', File::Spec->catfile($dir, 'foo.svn.gitSVNbar', 'good.txt')); close $fh; my @list = Test::Fixme::list_files($dir); is(scalar @list, 1, 'list length = 1') || diag join "\n", @list; like $list[0], qr{good.txt$}, 'filename =~ good.txt'; Test-Fixme-0.15/t/00_diag.t0000644000175000017500000000300712553047761014635 0ustar ollisgollisguse strict; use warnings; use Config; use Test::More tests => 1; BEGIN { my @modules; eval q{ require FindBin; require File::Spec; 1; } || die $@; do { my $fh; if(open($fh, '<', File::Spec->catfile($FindBin::Bin, '00_diag.pre.txt'))) { @modules = <$fh>; close $fh; chomp @modules; } }; eval qq{ require $_ } for @modules; }; sub spacer () { diag ''; diag ''; diag ''; } pass 'okay'; my @modules; do { my $fh; open($fh, '<', File::Spec->catfile($FindBin::Bin, '00_diag.txt')); @modules = <$fh>; close $fh; chomp @modules; }; my $max = 1; $max = $_ > $max ? $_ : $max for map { length $_ } @modules; our $format = "%-${max}s %s"; spacer; my @keys = sort grep /(MOJO|PERL|\A(LC|HARNESS)_|\A(SHELL|LANG)\Z)/i, keys %ENV; if(@keys > 0) { diag "$_=$ENV{$_}" for @keys; if($ENV{PERL5LIB}) { spacer; diag "PERL5LIB path"; diag $_ for split $Config{path_sep}, $ENV{PERL5LIB}; } elsif($ENV{PERLLIB}) { spacer; diag "PERLLIB path"; diag $_ for split $Config{path_sep}, $ENV{PERLLIB}; } spacer; } diag sprintf $format, 'perl ', $^V; require(File::Spec->catfile($FindBin::Bin, '00_diag.pl')) if -e File::Spec->catfile($FindBin::Bin, '00_diag.pl'); foreach my $module (@modules) { if(eval qq{ require $module; 1 }) { my $ver = eval qq{ \$$module\::VERSION }; $ver = 'undef' unless defined $ver; diag sprintf $format, $module, $ver; } else { diag sprintf $format, $module, '-'; } } spacer; Test-Fixme-0.15/META.json0000644000175000017500000000220512553047761014422 0ustar ollisgollisg{ "abstract" : "Check code for FIXMEs.", "author" : [ "Graham Ollis " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 5.036, CPAN::Meta::Converter version 2.150001", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Test-Fixme", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0", "perl" : "5.006002" } }, "runtime" : { "requires" : { "perl" : "5.006002" } }, "test" : { "requires" : { "perl" : "5.006002" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/plicease/Test-Fixme/issues" }, "homepage" : "http://perl.wdlabs.com/Test-Fixme", "repository" : { "type" : "git", "url" : "git://github.com/plicease/Test-Fixme.git", "web" : "https://github.com/plicease/Test-Fixme" } }, "version" : "0.15" } Test-Fixme-0.15/cpanfile0000644000175000017500000000027512553047761014512 0ustar ollisgollisgrequires "perl" => "5.006002"; on 'test' => sub { requires "perl" => "5.006002"; }; on 'configure' => sub { requires "ExtUtils::MakeMaker" => "0"; requires "perl" => "5.006002"; }; Test-Fixme-0.15/MANIFEST0000644000175000017500000000171012553047761014132 0ustar ollisgollisg# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.036. Changes INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README cpanfile dist.ini lib/Test/Fixme.pm lib/Test/Fixme.pm.bak t/00_diag.t t/00_diag.txt t/check_project.t t/dirs/deep/deep_a.txt t/dirs/deep/deep_b.txt t/dirs/deep/one/deep_one_a.txt t/dirs/deep/one/deep_one_b.txt t/dirs/deep/two/deep_two_a.txt t/dirs/deep/two/deep_two_b.txt t/dirs/manifest/MANIFEST t/dirs/manifest/alsogood.txt t/dirs/manifest/bad.txt t/dirs/manifest/good.txt t/dirs/normal/four.pod t/dirs/normal/one.txt t/dirs/normal/three.pm t/dirs/normal/two.pl t/dirs/types/normal.txt t/format_results.t t/list_files.t t/load_file.t t/manifest.t t/scan_file.t t/skip_all.t t/skip_git.t t/test-fixme.t xt/release/changes.t xt/release/eol.t xt/release/no_tabs.t xt/release/pod.t xt/release/pod_coverage.t xt/release/pod_spelling_common.t xt/release/pod_spelling_system.t xt/release/release.yml xt/release/version.t Test-Fixme-0.15/META.yml0000644000175000017500000000116212553047761014253 0ustar ollisgollisg--- abstract: 'Check code for FIXMEs.' author: - 'Graham Ollis ' build_requires: perl: '5.006002' configure_requires: ExtUtils::MakeMaker: '0' perl: '5.006002' dynamic_config: 0 generated_by: 'Dist::Zilla version 5.036, CPAN::Meta::Converter version 2.150001' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Test-Fixme requires: perl: '5.006002' resources: bugtracker: https://github.com/plicease/Test-Fixme/issues homepage: http://perl.wdlabs.com/Test-Fixme repository: git://github.com/plicease/Test-Fixme.git version: '0.15' Test-Fixme-0.15/dist.ini0000644000175000017500000000140012553047761014441 0ustar ollisgollisgname = Test-Fixme version = 0.15 author = Graham Ollis license = Perl_5 copyright_holder = Edmund von der Burg , Graham Ollis [@Author::Plicease] release_tests = 0 travis_status = 1 [Author::Plicease::Tests] skip = (strict|fixme).* ;[Prereqs] [RemovePrereqs] remove = strict remove = warnings remove = Carp remove = Exporter remove = vars remove = File::Spec remove = FindBin remove = ExtUtils::Manifest remove = File::Find remove = Test::Builder remove = Test::More remove = File::Temp [Author::Plicease::Upload] [Author::Plicease::Thanks] original = Edmund von der Burg current = Graham Ollis contributor = Dave O'Neill contributor = gregor herrmann Test-Fixme-0.15/INSTALL0000644000175000017500000000165312553047761014040 0ustar ollisgollisgThis is the Perl distribution Test-Fixme. Installing Test-Fixme is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm Test::Fixme If you are installing into a system-wide directory, you may need to pass the "-S" flag to cpanm, which uses sudo to install the module: % cpanm -S Test::Fixme ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan Test::Fixme ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, then build it: % perl Makefile.PL % make && make test Then install it: % make install If you are installing into a system-wide directory, you may need to run: % sudo make install ## Documentation Test-Fixme documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc Test::Fixme Test-Fixme-0.15/LICENSE0000644000175000017500000004416012553047761014014 0ustar ollisgollisgThis software is copyright (c) 2015 by Edmund von der Burg , Graham Ollis . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2015 by Edmund von der Burg , Graham Ollis . This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2015 by Edmund von der Burg , Graham Ollis . This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End Test-Fixme-0.15/Changes0000644000175000017500000000323612553047761014301 0ustar ollisgollisgRevision history for Test-Fixme 0.15 2015-07-19 21:33:34 -0400 - Production release identical to 0.14_03 0.14_03 2015-07-15 13:10:21 -0400 - Fixed typo: second at should have been line 0.14_02 2015-07-11 16:42:24 -0400 - documentation fixes 0.14_01 2015-07-09 12:43:16 -0400 - add format option and TEST_FIXME_FORMAT environment variable 0.14 2014-10-08 07:59:57 -0400 - fixed missing merge from 0.12 0.12 2014-10-08 07:57:04 -0400 - add warn option 0.11 2014-07-30 03:58:49 -0400 - make perl 5.6.2 a minimum requirement - simplify prereqs 0.10 2013-08-11T07:52:08-0400 - Documentation tweaks - Updated Changes to match spec 0.09 2013-03-21 11:15:08 America/New_York - Add proper resource links to META.json,yml 0.08 2013-01-15 12:19:43 America/New_York - Converted distribution to Dist::Zilla 0.07 Unknown - Allow specifying files in addition to directories. 0.06 Unknown - Remove dep on File::Slurp - Added manifest option 0.05 Unknown - Use File::Find instead of File::Finder - skip .git directory, like .svn and CSV 0.04 2008-03-12T22:51:51 - Added copyright info 0.03 2008-06-11T19:24:59+0100 - version bump to release to CPAN§ 0.02_01 2008-06-10T15:11:01-0400 dmo - allow list of directory names to be specified in 'where' argument - add 'filename_match' argument to filter for desired filenames 0.02 Unknown - switched to makemaker - changed tests to give better errors - filter out CVS and Subversion files from those tested Test-Fixme-0.15/README0000644000175000017500000001363412553047761013671 0ustar ollisgollisgNAME Test::Fixme - Check code for FIXMEs. VERSION version 0.15 SYNOPSIS # In a test script like 't/test-fixme.t' use Test::Fixme; run_tests(); # You can also tailor the behaviour. use Test::Fixme; run_tests( where => 'lib', # where to find files to check match => 'TODO', # what to check for skip_all => $ENV{SKIP} # should all tests be skipped ); DESCRIPTION When coding it is common to come up against problems that need to be addressed but that are not a big deal at the moment. What generally happens is that the coder adds comments like: # FIXME - what about windows that are bigger than the screen? # FIXME - add checking of user privileges here. Test::Fixme allows you to add a test file that ensures that none of these get forgotten in the module. METHODS run_tests By default run_tests will search for 'FIXME' in all the files it can find in the project. You can change these defaults by using 'where' or 'match' as follows: run_tests( where => 'lib', # just check the modules. match => 'TODO' # look for things that are not done yet. ); where Specifies where to search for files. This can be a scalar containing a single directory name, or it can be a list reference containing multiple directory names. match Expression to search for within the files. This may be a simple string, or a qr//-quoted regular expression. For example: match => qr/[T]ODO|[F]IXME|[B]UG/, filename_match Expression to filter file names. This should be a qr//-quoted regular expression. For example: match => qr/\.(:pm|pl)$/, would only match .pm and .pl files under your specified directory. manifest Specifies the name of your MANIFEST file which will be used as the list of files to test instead of where or filename_match. manifest => 'MANIFEST', warn Do not fail when a FIXME or other pattern is matched. Tests that would have been failures will still issue a diagnostic that will be viewed when you run prove without -v, make test or ./Build test. format Specifies format to be used for display of pattern matches. original The original and currently default format looks something like this: # File: './lib/Test/Fixme.pm' # 16 # ABSTRACT: Check code for FIXMEs. # 25 $args{match} = 'FIXME' unless defined $args{match} && length $args{match}; # 28 $args{format} ||= $ENV{TEST_FIXME_FORMAT}; # 228 # FIXME - what about windows that are bigger than the screen? # 230 # FIXME - add checking of user privileges here. # 239 By default run_tests will search for 'FIXME' in all the files it can # 280 Do not fail when a FIXME or other pattern is matched. Tests that would # 288 If you want to match something other than 'FIXME' then you may find # 296 run_tests( skip_all => $ENV{SKIP_TEST_FIXME} ); # 303 L With the line numbers on the left and the offending text on the right. perl The "perl" format is that used by Perl itself to report warnings and errors. # Pattern found at ./lib/Test/Fixme.pm line 16: # # ABSTRACT: Check code for FIXMEs. # Pattern found at ./lib/Test/Fixme.pm line 25: # $args{match} = 'FIXME' unless defined $args{match} && length $args{match}; # Pattern found at ./lib/Test/Fixme.pm line 28: # $args{format} ||= $ENV{TEST_FIXME_FORMAT}; # Pattern found at ./lib/Test/Fixme.pm line 228: # # FIXME - what about windows that are bigger than the screen? # Pattern found at ./lib/Test/Fixme.pm line 230: # # FIXME - add checking of user privileges here. # Pattern found at ./lib/Test/Fixme.pm line 239: # By default run_tests will search for 'FIXME' in all the files it can # Pattern found at ./lib/Test/Fixme.pm line 280: # Do not fail when a FIXME or other pattern is matched. Tests that would # Pattern found at ./lib/Test/Fixme.pm line 288: # If you want to match something other than 'FIXME' then you may find # Pattern found at ./lib/Test/Fixme.pm line 296: # run_tests( skip_all => $ENV{SKIP_TEST_FIXME} ); # Pattern found at ./lib/Test/Fixme.pm line 303: # L For files that contain many offending patterns it may be a bit harder to read for humans, but easier to parse for IDEs. You may also use the TEST_FIXME_FORMAT environment variable to override either the default or the value specified in the test file. HINTS If you want to match something other than 'FIXME' then you may find that the test file itself is being caught. Try doing this: run_tests( match => 'TO'.'DO' ); You may also wish to suppress the tests - try this: use Test::Fixme; run_tests( skip_all => $ENV{SKIP_TEST_FIXME} ); You can only run run_tests once per file. Please use several test files if you want to run several different tests. SEE ALSO Devel::FIXME ACKNOWLEDGMENTS Dave O'Neill added support for 'filename_match' and also being able to pass a list of several directories in the 'where' argument. Many thanks. AUTHOR Original author: Edmund von der Burg Current maintainer: Graham Ollis Contributors: Dave O'Neill gregor herrmann COPYRIGHT AND LICENSE This software is copyright (c) 2015 by Edmund von der Burg , Graham Ollis . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.