Hello community,
here is the log from the commit of package perl-Test-Without-Module for
openSUSE:Factory checked in at 2017-04-20 20:52:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Test-Without-Module (Old)
and /work/SRC/openSUSE:Factory/.perl-Test-Without-Module.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Test-Without-Module"
Thu Apr 20 20:52:42 2017 rev:6 rq:487660 version:0.20
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Test-Without-Module/perl-Test-Without-Module.changes
2017-04-11 12:43:59.632506940 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Test-Without-Module.new/perl-Test-Without-Module.changes
2017-04-20 20:52:43.856854625 +0200
@@ -1,0 +2,6 @@
+Mon Apr 10 06:48:44 UTC 2017 - [email protected]
+
+- updated to 0.20
+ see /usr/share/doc/packages/perl-Test-Without-Module/Changes
+
+-------------------------------------------------------------------
Old:
----
Test-Without-Module-0.19.tar.gz
New:
----
Test-Without-Module-0.20.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Test-Without-Module.spec ++++++
--- /var/tmp/diff_new_pack.yU9jdI/_old 2017-04-20 20:52:47.356359774 +0200
+++ /var/tmp/diff_new_pack.yU9jdI/_new 2017-04-20 20:52:47.360359208 +0200
@@ -17,7 +17,7 @@
Name: perl-Test-Without-Module
-Version: 0.19
+Version: 0.20
Release: 0
%define cpan_name Test-Without-Module
Summary: Test fallback behaviour in absence of modules
++++++ Test-Without-Module-0.19.tar.gz -> Test-Without-Module-0.20.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/Changes
new/Test-Without-Module-0.20/Changes
--- old/Test-Without-Module-0.19/Changes 2017-03-30 21:14:13.000000000
+0200
+++ new/Test-Without-Module-0.20/Changes 2017-04-09 17:49:58.000000000
+0200
@@ -3,7 +3,14 @@
Todo:
- Add way to allow only core modules (suggested by SREZIC)
-0.19 to be released
+0.20 20170409
+ - Make tests more resilient against old versions of Carp.pm (Paul Howarth)
+ Also addresses
+ https://rt.cpan.org/Public/Bug/Display.html?id=121002
+ - Typo fixes (Paul Howarth)
+ - Rework test suite, move author tests below xt/
+
+0.19 20170330
- Make error message more like the original Perl error message (haarg)
- Makefile.PL overhaul (by Abzal Serekov)
- Generate README.md
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/MANIFEST
new/Test-Without-Module-0.20/MANIFEST
--- old/Test-Without-Module-0.19/MANIFEST 2017-03-30 21:14:13.000000000
+0200
+++ new/Test-Without-Module-0.20/MANIFEST 2017-04-09 17:49:58.000000000
+0200
@@ -13,10 +13,14 @@
t/04-import-export.t
t/05-redefine.t
t/06-missing-hidden-modules.t
-t/99-manifest.t
-t/99-pod.t
-t/99-todo.t
-t/99-unix-text.t
-t/99-versions.t
t/embedded-Test-Without-Module.t
Texts/article.txt
+xt/99-changes.t
+xt/99-compile.t
+xt/99-manifest.t
+xt/99-pod.t
+xt/99-synopsis.t
+xt/99-todo.t
+xt/99-unix-text.t
+xt/99-versions.t
+xt/meta-lint.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/META.json
new/Test-Without-Module-0.20/META.json
--- old/Test-Without-Module-0.19/META.json 2017-03-30 21:14:16.000000000
+0200
+++ new/Test-Without-Module-0.20/META.json 2017-04-09 17:50:02.000000000
+0200
@@ -22,7 +22,7 @@
"provides" : {
"Test::Without::Module" : {
"file" : "lib/Test/Without/Module.pm",
- "version" : "0.19"
+ "version" : "0.20"
}
},
"release_status" : "stable",
@@ -36,7 +36,7 @@
"web" : "https://github.com/Corion/test-without-module"
}
},
- "version" : "0.19",
+ "version" : "0.20",
"x_serialization_backend" : "JSON::PP version 2.27202",
"x_static_install" : 1
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/META.yml
new/Test-Without-Module-0.20/META.yml
--- old/Test-Without-Module-0.19/META.yml 2017-03-30 21:14:16.000000000
+0200
+++ new/Test-Without-Module-0.20/META.yml 2017-04-09 17:50:02.000000000
+0200
@@ -17,10 +17,10 @@
provides:
Test::Without::Module:
file: lib/Test/Without/Module.pm
- version: '0.19'
+ version: '0.20'
resources:
license: http://dev.perl.org/licenses/
repository: git://github.com/Corion/test-without-module.git
-version: '0.19'
+version: '0.20'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
x_static_install: 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/Texts/article.txt
new/Test-Without-Module-0.20/Texts/article.txt
--- old/Test-Without-Module-0.19/Texts/article.txt 2017-03-30
21:14:13.000000000 +0200
+++ new/Test-Without-Module-0.20/Texts/article.txt 2017-04-09
17:49:58.000000000 +0200
@@ -11,8 +11,8 @@
a pragma-like syntax :</p>
<code>
-use Test::Without::Modules qw( HTML::Template );
-use Test::Without::Modules qr/^POE::/;
+use Test::Without::Module qw( HTML::Template );
+use Test::Without::Module qr/^POE::/;
</code>
<p>So, most of the magic will have to be installed in a sub called "import()"
@@ -266,4 +266,4 @@
L<Acme::Intraweb>, L<PAR>, L<perlfunc>
=cut
-</code>
\ No newline at end of file
+</code>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/lib/Test/Without/Module.pm
new/Test-Without-Module-0.20/lib/Test/Without/Module.pm
--- old/Test-Without-Module-0.19/lib/Test/Without/Module.pm 2017-03-30
21:14:13.000000000 +0200
+++ new/Test-Without-Module-0.20/lib/Test/Without/Module.pm 2017-04-09
17:49:58.000000000 +0200
@@ -3,7 +3,7 @@
use Carp qw( croak );
use vars qw( $VERSION );
-$VERSION = '0.19';
+$VERSION = '0.20';
use vars qw(%forbidden);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/Test-Without-Module-0.19/t/06-missing-hidden-modules.t
new/Test-Without-Module-0.20/t/06-missing-hidden-modules.t
--- old/Test-Without-Module-0.19/t/06-missing-hidden-modules.t 2017-03-30
21:13:47.000000000 +0200
+++ new/Test-Without-Module-0.20/t/06-missing-hidden-modules.t 2017-04-09
17:49:58.000000000 +0200
@@ -28,5 +28,5 @@
($failed,$error,$inc) = tryload( 'IO::Socket' );
is $failed, 1, "a non-existing module fails to load";
-like $error, qr!Can't locate IO/Socket.pm in \@INC( \(you may need to install
the IO::Socket module\))? \(\@INC contains: ...\) line (\d+).!, 'error message
for hidden module shows @INC';
-#diag $error;
\ No newline at end of file
+like $error, qr!Can't locate IO/Socket.pm in \@INC( \(you may need to install
the IO::Socket module\))? \(\@INC contains: ...\) line (\d+)!, 'error message
for hidden module shows @INC';
+#diag $error;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/t/99-manifest.t
new/Test-Without-Module-0.20/t/99-manifest.t
--- old/Test-Without-Module-0.19/t/99-manifest.t 2017-03-30
21:14:13.000000000 +0200
+++ new/Test-Without-Module-0.20/t/99-manifest.t 1970-01-01
01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-use strict;
-use Test::More;
-
-# Check that MANIFEST and MANIFEST.SKIP are sane :
-
-use File::Find;
-use File::Spec;
-
-my @files = qw( MANIFEST MANIFEST.SKIP );
-plan tests => scalar @files * 4;
-
-for my $file (@files) {
- ok(-f $file, "$file exists");
- open F, "<$file"
- or die "Couldn't open $file : $!";
- my @lines = <F>;
- is_deeply([grep(/^$/, @lines)],[], "No empty lines in $file");
- is_deeply([grep(/^\s+$/, @lines)],[], "No whitespace-only lines in $file");
- is_deeply([grep(/^\s*\S\s+$/, @lines)],[],"No trailing whitespace on lines
in $file");
- close F;
-};
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/t/99-pod.t
new/Test-Without-Module-0.20/t/99-pod.t
--- old/Test-Without-Module-0.19/t/99-pod.t 2017-03-30 21:14:13.000000000
+0200
+++ new/Test-Without-Module-0.20/t/99-pod.t 1970-01-01 01:00:00.000000000
+0100
@@ -1,36 +0,0 @@
-use Test::More;
-
-# Check our Pod
-# The test was provided by Andy Lester,
-# who stole it from Brian D. Foy
-# Thanks to both !
-
-use File::Spec;
-use File::Find;
-use strict;
-
-eval {
- require Test::Pod;
- Test::Pod->import;
-};
-
-my @files;
-
-if ($@) {
- plan skip_all => "Test::Pod required for testing POD";
-}
-elsif ($Test::Pod::VERSION < 0.95) {
- plan skip_all => "Test::Pod 0.95 required for testing POD";
-}
-else {
- my $blib = File::Spec->catfile(qw(blib lib));
- find(\&wanted, $blib);
- plan tests => scalar @files;
- foreach my $file (@files) {
- pod_file_ok($file);
- }
-}
-
-sub wanted {
- push @files, $File::Find::name if /\.p(l|m|od)$/;
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/t/99-todo.t
new/Test-Without-Module-0.20/t/99-todo.t
--- old/Test-Without-Module-0.19/t/99-todo.t 2017-03-30 21:14:13.000000000
+0200
+++ new/Test-Without-Module-0.20/t/99-todo.t 1970-01-01 01:00:00.000000000
+0100
@@ -1,44 +0,0 @@
-use Test::More;
-use File::Spec;
-use File::Find;
-use strict;
-
-# Check that all files do not contain any
-# lines with "XXX" - such markers should
-# either have been converted into Todo-stuff
-# or have been resolved.
-# The test was provided by Andy Lester.
-
-my @files;
-my $blib = File::Spec->catfile(qw(blib lib));
-find(\&wanted, $blib);
-plan tests => scalar @files;
-foreach my $file (@files) {
- source_file_ok($file);
-}
-
-sub wanted {
- push @files, $File::Find::name if /\.p(l|m|od)$/;
-}
-
-sub source_file_ok {
- my $file = shift;
-
- local *FILE;
- open FILE, $file
- or die "Can't open $file: $!";
- my @lines = <FILE>;
- close FILE;
-
- my $n = 0;
- for ( @lines ) {
- ++$n;
- s/^/$file ($n): /;
- }
-
- my @x = grep /XXX/, @lines;
-
- if ( !is( scalar @x, 0, "Looking for XXXes in $file" ) ) {
- diag( $_ ) for @x;
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/t/99-unix-text.t
new/Test-Without-Module-0.20/t/99-unix-text.t
--- old/Test-Without-Module-0.19/t/99-unix-text.t 2017-03-30
21:14:13.000000000 +0200
+++ new/Test-Without-Module-0.20/t/99-unix-text.t 1970-01-01
01:00:00.000000000 +0100
@@ -1,37 +0,0 @@
-use Test::More;
-
-# Check that all released module files are in
-# UNIX text format
-
-use File::Spec;
-use File::Find;
-use strict;
-
-my @files;
-
-my $blib = File::Spec->catfile(qw(blib lib));
-find(\&wanted, $blib);
-plan tests => scalar @files;
-foreach my $file (@files) {
- unix_file_ok($file);
-}
-
-sub wanted {
- push @files, $File::Find::name if /\.p(l|m|od)$/;
-}
-
-sub unix_file_ok {
- my ($filename) = @_;
- local $/;
- open F, "< $filename"
- or die "Couldn't open '$filename' : $!\n";
- binmode F;
- my $content = <F>;
-
- my $i;
- my @lines = grep { /\x0D\x0A$/sm } map { sprintf "%s: %s\x0A", $i++, $_ }
split /\x0A/, $content;
- unless (is(scalar @lines, 0,"'$filename' contains no windows newlines")) {
- diag $_ for @lines;
- };
- close F;
-};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/t/99-versions.t
new/Test-Without-Module-0.20/t/99-versions.t
--- old/Test-Without-Module-0.19/t/99-versions.t 2017-03-30
21:14:13.000000000 +0200
+++ new/Test-Without-Module-0.20/t/99-versions.t 1970-01-01
01:00:00.000000000 +0100
@@ -1,49 +0,0 @@
-#!perl -w
-
-# Stolen from ChrisDolan on use.perl.org
-# http://use.perl.org/comments.pl?sid=29264&cid=44309
-
-use warnings;
-use strict;
-use File::Find;
-use Test::More;
-BEGIN {
- eval 'use File::Slurp; 1';
- if ($@) {
- plan skip_all => "File::Slurp needed for testing";
- exit 0;
- };
-};
-
-plan 'no_plan';
-
-my $last_version = undef;
-
-sub check {
- return if (! m{blib/script/}xms && ! m{\.pm \z}xms);
-
- my $content = read_file($_);
-
- # only look at perl scripts, not sh scripts
- return if (m{blib/script/}xms && $content !~ m/\A \#![^\r\n]+?perl/xms);
-
- my @version_lines = $content =~ m/ ( [^\n]* \$VERSION \s* = [^=] [^\n]*
) /gxms;
- if (@version_lines == 0) {
- fail($_);
- }
- for my $line (@version_lines) {
- if (!defined $last_version) {
- $last_version = shift @version_lines;
- diag "Checking for $last_version";
- pass($_);
- } else {
- is($line, $last_version, $_);
- }
- }
-}
-
-find({wanted => \&check, no_chdir => 1}, 'blib');
-
-if (! defined $last_version) {
- fail('Failed to find any files with $VERSION');
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/xt/99-changes.t
new/Test-Without-Module-0.20/xt/99-changes.t
--- old/Test-Without-Module-0.19/xt/99-changes.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Test-Without-Module-0.20/xt/99-changes.t 2017-04-09
17:49:58.000000000 +0200
@@ -0,0 +1,32 @@
+#!perl -w
+use warnings;
+use strict;
+use File::Find;
+use Test::More tests => 2;
+
+=head1 PURPOSE
+
+This test ensures that the Changes file
+mentions the current version and that a
+release date is mentioned as well
+
+=cut
+
+use lib '.';
+use vars '%module';
+require 'Makefile.PL';
+# Loaded from Makefile.PL
+%module = get_module_info();
+my $module = $module{NAME};
+
+my $file = $module{ VERSION_FROM };
+require $file;
+
+my $version = sprintf '%0.2f', $module->VERSION;
+
+my $changes = do { local $/; open my $fh, 'Changes' or die $!; <$fh> };
+
+ok $changes =~ /^(.*$version.*)$/m, "We find version $version for $module";
+my $changes_line = $1;
+ok $changes_line =~ /$version\s+20\d{6}/, "We find a release date on the same
line"
+ or diag $changes_line;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/xt/99-compile.t
new/Test-Without-Module-0.20/xt/99-compile.t
--- old/Test-Without-Module-0.19/xt/99-compile.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Test-Without-Module-0.20/xt/99-compile.t 2017-04-09
17:49:58.000000000 +0200
@@ -0,0 +1,43 @@
+#!perl -w
+
+use warnings;
+use strict;
+use File::Find;
+use Test::More;
+BEGIN {
+ eval 'use Capture::Tiny ":all"; 1';
+ if ($@) {
+ plan skip_all => "Capture::Tiny needed for testing";
+ exit 0;
+ };
+};
+
+plan 'no_plan';
+
+my $last_version = undef;
+
+sub check {
+ return if (! m{(\.pm|\.pl|\.psgi) \z}xmsi);
+
+ my ($stdout, $stderr, $exit) = capture(sub {
+ system( $^X, '-Mblib', '-wc', $_ );
+ });
+
+ s!\s*\z!!
+ for ($stdout, $stderr);
+
+ if( $exit ) {
+ diag $exit;
+ fail($_);
+ } elsif( $stderr ne "$_ syntax OK") {
+ diag $stderr;
+ fail($_);
+ } else {
+ pass($_);
+ };
+}
+
+find({wanted => \&check, no_chdir => 1},
+ grep { -d $_ }
+ 'blib', 'scripts', 'examples', 'bin', 'lib'
+ );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/xt/99-manifest.t
new/Test-Without-Module-0.20/xt/99-manifest.t
--- old/Test-Without-Module-0.19/xt/99-manifest.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Test-Without-Module-0.20/xt/99-manifest.t 2017-04-09
17:49:58.000000000 +0200
@@ -0,0 +1,31 @@
+use strict;
+use Test::More;
+
+# Check that MANIFEST and MANIFEST.skip are sane :
+
+use File::Find;
+use File::Spec;
+
+my @files = qw( MANIFEST MANIFEST.SKIP );
+plan tests => scalar @files * 4
+ +1 # MANIFEST existence check
+ ;
+
+for my $file (@files) {
+ ok(-f $file, "$file exists");
+ open F, "<$file"
+ or die "Couldn't open $file : $!";
+ my @lines = <F>;
+ is_deeply([grep(/^$/, @lines)],[], "No empty lines in $file");
+ is_deeply([grep(/^\s+$/, @lines)],[], "No whitespace-only lines in $file");
+ is_deeply([grep(/^\s*\S\s+$/, @lines)],[],"No trailing whitespace on lines
in $file");
+
+ if ($file eq 'MANIFEST') {
+ chomp @lines;
+ is_deeply([grep { s/\s.*//; ! -f } @lines], [], "All files in $file exist")
+ or do { diag "$_ is mentioned in $file but doesn't exist on disk" for
grep { ! -f } @lines };
+ };
+
+ close F;
+};
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/xt/99-pod.t
new/Test-Without-Module-0.20/xt/99-pod.t
--- old/Test-Without-Module-0.19/xt/99-pod.t 1970-01-01 01:00:00.000000000
+0100
+++ new/Test-Without-Module-0.20/xt/99-pod.t 2017-04-09 17:49:58.000000000
+0200
@@ -0,0 +1,36 @@
+use Test::More;
+
+# Check our Pod
+# The test was provided by Andy Lester,
+# who stole it from Brian D. Foy
+# Thanks to both !
+
+use File::Spec;
+use File::Find;
+use strict;
+
+eval {
+ require Test::Pod;
+ Test::Pod->import;
+};
+
+my @files;
+
+if ($@) {
+ plan skip_all => "Test::Pod required for testing POD";
+}
+elsif ($Test::Pod::VERSION < 0.95) {
+ plan skip_all => "Test::Pod 0.95 required for testing POD";
+}
+else {
+ my $blib = File::Spec->catfile(qw(blib lib));
+ find(\&wanted, grep { -d } ($blib, 'bin'));
+ plan tests => scalar @files;
+ foreach my $file (@files) {
+ pod_file_ok($file);
+ }
+}
+
+sub wanted {
+ push @files, $File::Find::name if /\.p(l|m|od)$/;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/xt/99-synopsis.t
new/Test-Without-Module-0.20/xt/99-synopsis.t
--- old/Test-Without-Module-0.19/xt/99-synopsis.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Test-Without-Module-0.20/xt/99-synopsis.t 2017-04-09
17:49:58.000000000 +0200
@@ -0,0 +1,64 @@
+use strict;
+use Test::More;
+use File::Spec;
+use File::Find;
+use File::Temp 'tempfile';
+use Getopt::Long;
+
+GetOptions(
+ 'verbose' => \my $verbose,
+);
+
+my @files;
+
+my $blib = File::Spec->catfile(qw(blib lib));
+find(\&wanted, grep { -d } ($blib, 'bin'));
+
+plan tests => scalar @files;
+foreach my $file (@files) {
+ synopsis_file_ok($file);
+}
+
+sub wanted {
+ push @files, $File::Find::name if /\.p(l|m|od)$/;
+}
+
+sub synopsis_file_ok {
+ my( $file ) = @_;
+ my $name = "SYNOPSIS in $file compiles";
+ open my $fh, '<', $file
+ or die "Couldn't read '$file': $!";
+ my $start;
+ my $line = 0;
+ my @synopsis = map { s!^\s\s!!; $_ } # outdent all code for here-docs
+ grep { /^\s\s/ } # extract all verbatim (=code) stuff
+ grep { /^=head1\s+SYNOPSIS$/.../^=/ } # extract Pod synopsis
+ map { $line++;
+ /^=head1\s+SYNOPSIS$/ and $start = $line+1;
+ $_ } # remember start of synopsis
+ <$fh>;
+ if( $verbose ) {
+ diag $_ for @synopsis
+ };
+ if( @synopsis ) {
+ my($tmpfh,$tempname) = tempfile();
+ print {$tmpfh} qq(#line $start "$file"\n);
+ print {$tmpfh} join '', @synopsis;
+ close $tmpfh; # flush it
+ my $output = `$^X -Ilib -c $tempname 2>&1`;
+ if( $output =~ /\ssyntax OK$/ ) {
+ pass $name;
+ } else {
+ fail $name;
+ diag $output;
+ diag $_ for @synopsis;
+ };
+ unlink $tempname
+ or warn "Couldn't clean up $tempname: $!";
+ } else {
+ SKIP: {
+ skip "$file has no SYNOPSIS section", 1;
+ };
+ };
+
+}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/xt/99-todo.t
new/Test-Without-Module-0.20/xt/99-todo.t
--- old/Test-Without-Module-0.19/xt/99-todo.t 1970-01-01 01:00:00.000000000
+0100
+++ new/Test-Without-Module-0.20/xt/99-todo.t 2017-04-09 17:49:58.000000000
+0200
@@ -0,0 +1,47 @@
+use Test::More;
+use File::Spec;
+use File::Find;
+use strict;
+
+# Check that all files do not contain any
+# lines with "XXX" - such markers should
+# either have been converted into Todo-stuff
+# or have been resolved.
+# The test was provided by Andy Lester.
+
+my @files;
+my $blib = File::Spec->catfile(qw(blib lib));
+find(\&wanted, grep { -d } ($blib, 'bin'));
+plan tests => 2* @files;
+foreach my $file (@files) {
+ source_file_ok($file);
+}
+
+sub wanted {
+ push @files, $File::Find::name if /\.p(l|m|od)$/;
+}
+
+sub source_file_ok {
+ my $file = shift;
+
+ open( my $fh, "<$file" ) or die "Can't open $file: $!";
+ my @lines = <$fh>;
+ close $fh;
+
+ my $n = 0;
+ for ( @lines ) {
+ ++$n;
+ s/^/$file ($n): /;
+ }
+
+ my @x = grep /XXX/, @lines;
+
+ if ( !is( scalar @x, 0, "Looking for XXXes in $file" ) ) {
+ diag( $_ ) for @x;
+ }
+ @x = grep /<<<|>>>/, @lines;
+
+ if ( !is( scalar @x, 0, "Looking for <<<<|>>>> in $file" ) ) {
+ diag( $_ ) for @x;
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/xt/99-unix-text.t
new/Test-Without-Module-0.20/xt/99-unix-text.t
--- old/Test-Without-Module-0.19/xt/99-unix-text.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Test-Without-Module-0.20/xt/99-unix-text.t 2017-04-09
17:49:58.000000000 +0200
@@ -0,0 +1,37 @@
+use Test::More;
+
+# Check that all released module files are in
+# UNIX text format
+
+use File::Spec;
+use File::Find;
+use strict;
+
+my @files;
+
+my $blib = File::Spec->catfile(qw(blib lib));
+find(\&wanted, grep { -d } ($blib, 'bin'));
+plan tests => scalar @files;
+foreach my $file (@files) {
+ unix_file_ok($file);
+}
+
+sub wanted {
+ push @files, $File::Find::name if /\.p(l|m|od)$/;
+}
+
+sub unix_file_ok {
+ my ($filename) = @_;
+ local $/;
+ open F, "< $filename"
+ or die "Couldn't open '$filename' : $!\n";
+ binmode F;
+ my $content = <F>;
+
+ my $i;
+ my @lines = grep { /\x0D\x0A$/sm } map { sprintf "%s: %s\x0A", $i++, $_ }
split /\x0A/, $content;
+ unless (is(scalar @lines, 0,"'$filename' contains no windows newlines")) {
+ diag $_ for @lines;
+ };
+ close F;
+};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/xt/99-versions.t
new/Test-Without-Module-0.20/xt/99-versions.t
--- old/Test-Without-Module-0.19/xt/99-versions.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Test-Without-Module-0.20/xt/99-versions.t 2017-04-09
17:49:58.000000000 +0200
@@ -0,0 +1,51 @@
+#!perl -w
+
+# Stolen from ChrisDolan on use.perl.org
+# http://use.perl.org/comments.pl?sid=29264&cid=44309
+
+use warnings;
+use strict;
+use File::Find;
+use Test::More;
+BEGIN {
+ eval 'use File::Slurp; 1';
+ if ($@) {
+ plan skip_all => "File::Slurp needed for testing";
+ exit 0;
+ };
+};
+
+plan 'no_plan';
+
+my $last_version = undef;
+
+sub check {
+ return if (! m{blib/script/}xms && ! m{\.pm \z}xms);
+
+ my $content = read_file($_);
+
+ # only look at perl scripts, not sh scripts
+ return if (m{blib/script/}xms && $content !~ m/\A \#![^\r\n]+?perl/xms);
+
+ my @version_lines = $content =~ m/ ( [^\n]* \$VERSION \s* = [^=] [^\n]*
) /gxms;
+ if (@version_lines == 0) {
+ fail($_);
+ }
+ for my $line (@version_lines) {
+ $line =~ s/^\s+//;
+ $line =~ s/\s+$//;
+ if (!defined $last_version) {
+ $last_version = shift @version_lines;
+ diag "Checking for $last_version";
+ pass($_);
+ } else {
+ is($line, $last_version, $_);
+ }
+ }
+}
+
+find({wanted => \&check, no_chdir => 1}, 'blib');
+
+if (! defined $last_version) {
+ fail('Failed to find any files with $VERSION');
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Without-Module-0.19/xt/meta-lint.t
new/Test-Without-Module-0.20/xt/meta-lint.t
--- old/Test-Without-Module-0.19/xt/meta-lint.t 1970-01-01 01:00:00.000000000
+0100
+++ new/Test-Without-Module-0.20/xt/meta-lint.t 2017-04-09 17:49:58.000000000
+0200
@@ -0,0 +1,38 @@
+#!perl -w
+
+# Stolen from ChrisDolan on use.perl.org
+# http://use.perl.org/comments.pl?sid=29264&cid=44309
+
+use warnings;
+use strict;
+use File::Find;
+use Test::More;
+use Parse::CPAN::Meta;
+use CPAN::Meta::Validator;
+
+use lib '.';
+use vars '%module';
+require 'Makefile.PL';
+# Loaded from Makefile.PL
+%module = get_module_info();
+my $module = $module{NAME};
+
+(my $file = $module) =~ s!::!/!g;
+require "$file.pm";
+
+my $version = sprintf '%0.2f', $module->VERSION;
+
+for my $meta_file ('META.yml', 'META.json') {
+ my $meta = Parse::CPAN::Meta->load_file($meta_file);
+
+ my $cmv = CPAN::Meta::Validator->new( $meta );
+
+ if(! ok $cmv->is_valid, "$meta_file is valid" ) {
+ diag $_ for $cmv->errors;
+ };
+
+ # Also check that the declared version matches the version in META.*
+ is $meta->{version}, $version, "$meta_file version matches module version
($version)";
+};
+
+done_testing;
\ No newline at end of file