diff options
Diffstat (limited to 't')
-rw-r--r-- | t/00-compile.t | 51 | ||||
-rw-r--r-- | t/00-report-prereqs.dd | 51 | ||||
-rw-r--r-- | t/00-report-prereqs.t | 183 | ||||
-rw-r--r-- | t/author-eol.t | 37 | ||||
-rw-r--r-- | t/author-no-tabs.t | 37 | ||||
-rw-r--r-- | t/author-pod-spell.t | 40 | ||||
-rw-r--r-- | t/basic.t | 275 | ||||
-rw-r--r-- | t/release-cpan-changes.t | 19 | ||||
-rw-r--r-- | t/release-pod-coverage.t | 52 | ||||
-rw-r--r-- | t/release-pod-linkcheck.t | 28 | ||||
-rw-r--r-- | t/release-pod-no404s.t | 29 | ||||
-rw-r--r-- | t/release-pod-syntax.t | 14 | ||||
-rw-r--r-- | t/release-portability.t | 20 | ||||
-rw-r--r-- | t/release-test-version.t | 30 | ||||
-rw-r--r-- | t/release-tidyall.t | 17 |
15 files changed, 883 insertions, 0 deletions
diff --git a/t/00-compile.t b/t/00-compile.t new file mode 100644 index 0000000..5e29d26 --- /dev/null +++ b/t/00-compile.t @@ -0,0 +1,51 @@ +use 5.006; +use strict; +use warnings; + +# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.052 + +use Test::More; + +plan tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0); + +my @module_files = ( + 'Package/DeprecationManager.pm' +); + + + +# no fake home requested + +my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib'; + +use File::Spec; +use IPC::Open3; +use IO::Handle; + +open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; + +my @warnings; +for my $lib (@module_files) +{ + # see L<perlfaq8/How can I capture STDERR from an external command?> + my $stderr = IO::Handle->new; + + my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]"); + binmode $stderr, ':crlf' if $^O eq 'MSWin32'; + my @_warnings = <$stderr>; + waitpid($pid, 0); + is($?, 0, "$lib loaded ok"); + + if (@_warnings) + { + warn @_warnings; + push @warnings, @_warnings; + } +} + + + +is(scalar(@warnings), 0, 'no warnings found') + or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING}; + + diff --git a/t/00-report-prereqs.dd b/t/00-report-prereqs.dd new file mode 100644 index 0000000..b31b4a1 --- /dev/null +++ b/t/00-report-prereqs.dd @@ -0,0 +1,51 @@ +do { my $x = { + 'configure' => { + 'requires' => { + 'ExtUtils::MakeMaker' => '0' + } + }, + 'develop' => { + 'requires' => { + 'Code::TidyAll' => '0.24', + 'Perl::Critic' => '1.123', + 'Perl::Tidy' => '20140711', + 'Pod::Coverage::TrustPod' => '0', + 'Test::CPAN::Changes' => '0.19', + 'Test::Code::TidyAll' => '0.24', + 'Test::EOL' => '0', + 'Test::More' => '0.88', + 'Test::NoTabs' => '0', + 'Test::Pod' => '1.41', + 'Test::Pod::Coverage' => '1.08', + 'Test::Spelling' => '0.12', + 'Test::Version' => '1' + } + }, + 'runtime' => { + 'requires' => { + 'Carp' => '0', + 'List::Util' => '1.33', + 'Params::Util' => '0', + 'Sub::Install' => '0', + 'strict' => '0', + 'warnings' => '0' + } + }, + 'test' => { + 'recommends' => { + 'CPAN::Meta' => '2.120900' + }, + 'requires' => { + 'ExtUtils::MakeMaker' => '0', + 'File::Spec' => '0', + 'IO::Handle' => '0', + 'IPC::Open3' => '0', + 'Test::Fatal' => '0', + 'Test::More' => '0.96', + 'Test::Requires' => '0', + 'perl' => '5.006' + } + } + }; + $x; + }
\ No newline at end of file diff --git a/t/00-report-prereqs.t b/t/00-report-prereqs.t new file mode 100644 index 0000000..d8d15ba --- /dev/null +++ b/t/00-report-prereqs.t @@ -0,0 +1,183 @@ +#!perl + +use strict; +use warnings; + +# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.021 + +use Test::More tests => 1; + +use ExtUtils::MakeMaker; +use File::Spec; + +# from $version::LAX +my $lax_version_re = + qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? + | + (?:\.[0-9]+) (?:_[0-9]+)? + ) | (?: + v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? + | + (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? + ) + )/x; + +# hide optional CPAN::Meta modules from prereq scanner +# and check if they are available +my $cpan_meta = "CPAN::Meta"; +my $cpan_meta_pre = "CPAN::Meta::Prereqs"; +my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic + +# Verify requirements? +my $DO_VERIFY_PREREQS = 1; + +sub _max { + my $max = shift; + $max = ( $_ > $max ) ? $_ : $max for @_; + return $max; +} + +sub _merge_prereqs { + my ($collector, $prereqs) = @_; + + # CPAN::Meta::Prereqs object + if (ref $collector eq $cpan_meta_pre) { + return $collector->with_merged_prereqs( + CPAN::Meta::Prereqs->new( $prereqs ) + ); + } + + # Raw hashrefs + for my $phase ( keys %$prereqs ) { + for my $type ( keys %{ $prereqs->{$phase} } ) { + for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { + $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; + } + } + } + + return $collector; +} + +my @include = qw( + +); + +my @exclude = qw( + +); + +# Add static prereqs to the included modules list +my $static_prereqs = do 't/00-report-prereqs.dd'; + +# Merge all prereqs (either with ::Prereqs or a hashref) +my $full_prereqs = _merge_prereqs( + ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), + $static_prereqs +); + +# Add dynamic prereqs to the included modules list (if we can) +my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; +if ( $source && $HAS_CPAN_META ) { + if ( my $meta = eval { CPAN::Meta->load_file($source) } ) { + $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); + } +} +else { + $source = 'static metadata'; +} + +my @full_reports; +my @dep_errors; +my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; + +# Add static includes into a fake section +for my $mod (@include) { + $req_hash->{other}{modules}{$mod} = 0; +} + +for my $phase ( qw(configure build test runtime develop other) ) { + next unless $req_hash->{$phase}; + next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); + + for my $type ( qw(requires recommends suggests conflicts modules) ) { + next unless $req_hash->{$phase}{$type}; + + my $title = ucfirst($phase).' '.ucfirst($type); + my @reports = [qw/Module Want Have/]; + + for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { + next if $mod eq 'perl'; + next if grep { $_ eq $mod } @exclude; + + my $file = $mod; + $file =~ s{::}{/}g; + $file .= ".pm"; + my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; + + my $want = $req_hash->{$phase}{$type}{$mod}; + $want = "undef" unless defined $want; + $want = "any" if !$want && $want == 0; + + my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; + + if ($prefix) { + my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); + $have = "undef" unless defined $have; + push @reports, [$mod, $want, $have]; + + if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { + if ( $have !~ /\A$lax_version_re\z/ ) { + push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; + } + elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { + push @dep_errors, "$mod version '$have' is not in required range '$want'"; + } + } + } + else { + push @reports, [$mod, $want, "missing"]; + + if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { + push @dep_errors, "$mod is not installed ($req_string)"; + } + } + } + + if ( @reports ) { + push @full_reports, "=== $title ===\n\n"; + + my $ml = _max( map { length $_->[0] } @reports ); + my $wl = _max( map { length $_->[1] } @reports ); + my $hl = _max( map { length $_->[2] } @reports ); + + if ($type eq 'modules') { + splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; + push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; + } + else { + splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; + push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; + } + + push @full_reports, "\n"; + } + } +} + +if ( @full_reports ) { + diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; +} + +if ( @dep_errors ) { + diag join("\n", + "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n", + "The following REQUIRED prerequisites were not satisfied:\n", + @dep_errors, + "\n" + ); +} + +pass; + +# vim: ts=4 sts=4 sw=4 et: diff --git a/t/author-eol.t b/t/author-eol.t new file mode 100644 index 0000000..9dd7031 --- /dev/null +++ b/t/author-eol.t @@ -0,0 +1,37 @@ + +BEGIN { + unless ($ENV{AUTHOR_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for testing by the author'); + } +} + +use strict; +use warnings; + +# this test was generated with Dist::Zilla::Plugin::Test::EOL 0.17 + +use Test::More 0.88; +use Test::EOL; + +my @files = ( + 'lib/Package/DeprecationManager.pm', + 't/00-compile.t', + 't/00-report-prereqs.dd', + 't/00-report-prereqs.t', + 't/author-eol.t', + 't/author-no-tabs.t', + 't/author-pod-spell.t', + 't/basic.t', + 't/release-cpan-changes.t', + 't/release-pod-coverage.t', + 't/release-pod-linkcheck.t', + 't/release-pod-no404s.t', + 't/release-pod-syntax.t', + 't/release-portability.t', + 't/release-test-version.t', + 't/release-tidyall.t' +); + +eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; +done_testing; diff --git a/t/author-no-tabs.t b/t/author-no-tabs.t new file mode 100644 index 0000000..41ea27f --- /dev/null +++ b/t/author-no-tabs.t @@ -0,0 +1,37 @@ + +BEGIN { + unless ($ENV{AUTHOR_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for testing by the author'); + } +} + +use strict; +use warnings; + +# this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.13 + +use Test::More 0.88; +use Test::NoTabs; + +my @files = ( + 'lib/Package/DeprecationManager.pm', + 't/00-compile.t', + 't/00-report-prereqs.dd', + 't/00-report-prereqs.t', + 't/author-eol.t', + 't/author-no-tabs.t', + 't/author-pod-spell.t', + 't/basic.t', + 't/release-cpan-changes.t', + 't/release-pod-coverage.t', + 't/release-pod-linkcheck.t', + 't/release-pod-no404s.t', + 't/release-pod-syntax.t', + 't/release-portability.t', + 't/release-test-version.t', + 't/release-tidyall.t' +); + +notabs_ok($_) foreach @files; +done_testing; diff --git a/t/author-pod-spell.t b/t/author-pod-spell.t new file mode 100644 index 0000000..74bbbd8 --- /dev/null +++ b/t/author-pod-spell.t @@ -0,0 +1,40 @@ + +BEGIN { + unless ($ENV{AUTHOR_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for testing by the author'); + } +} + +use strict; +use warnings; +use Test::More; + +# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006008 +use Test::Spelling 0.12; +use Pod::Wordlist; + + +add_stopwords(<DATA>); +all_pod_files_spelling_ok( qw( bin lib ) ); +__DATA__ +DROLSKY +DROLSKY's +Rolsky +Rolsky's +Goro +deprecations +Dave +autarch +Jesse +Luehrs +doy +Karen +Etheridge +ether +Tomas +Doran +bobtfish +lib +Package +DeprecationManager diff --git a/t/basic.t b/t/basic.t new file mode 100644 index 0000000..34dce52 --- /dev/null +++ b/t/basic.t @@ -0,0 +1,275 @@ +use strict; +use warnings; + +use Test::Fatal; +use Test::More 0.88; + +use Test::Requires { + 'Test::Output' => '0.16', +}; + +{ + ## no critic (BuiltinFunctions::ProhibitStringyEval, ErrorHandling::RequireCheckingReturnValueOfEval) + like( + exception { + eval 'package Whatever; use Package::DeprecationManager;'; + die $@ if $@; + }, + qr/^\QYou must provide a hash reference -deprecations parameter when importing Package::DeprecationManager/, + 'must provide a set of deprecations when using Package::DeprecationManager' + ); +} + +## no critic (Modules::ProhibitMultiplePackages) + +{ + package Foo; + + use Package::DeprecationManager -deprecations => { + 'Foo::foo' => '0.02', + 'Foo::bar' => '0.03', + 'Foo::baz' => '1.21', + 'not a sub' => '1.23', + }; + + sub foo { + deprecated('foo is deprecated'); + } + + sub bar { + deprecated('bar is deprecated'); + } + + sub baz { + deprecated(); + } + + sub quux { + if ( $_[0] > 5 ) { + deprecated( + message => 'quux > 5 has been deprecated', + feature => 'not a sub', + ); + } + } + + sub varies { + deprecated("The varies sub varies: $_[0]"); + } + +} + +{ + package Bar; + + Foo->import(); + + ::stderr_like( + sub { Foo::foo() }, + qr/\Qfoo is deprecated/, + 'deprecation warning for foo' + ); + + ::stderr_like( + sub { Foo::bar() }, + qr/\Qbar is deprecated/, + 'deprecation warning for bar' + ); + + ::stderr_like( + sub { Foo::baz() }, + qr/\QFoo::baz has been deprecated since version 1.21/, + 'deprecation warning for baz, and message is generated by Package::DeprecationManager' + ); + + ::stderr_is( + sub { Foo::foo() }, + q{}, 'no warning on second call to foo' + ); + + ::stderr_is( + sub { Foo::bar() }, + q{}, 'no warning on second call to bar' + ); + + ::stderr_is( + sub { Foo::baz() }, + q{}, 'no warning on second call to baz' + ); + + ::stderr_like( + sub { Foo::varies(1) }, + qr/\QThe varies sub varies: 1/, + 'warning for varies sub' + ); + + ::stderr_like( + sub { Foo::varies(2) }, + qr/\QThe varies sub varies: 2/, + 'warning for varies sub with different error' + ); + + ::stderr_is( + sub { Foo::varies(1) }, + q{}, + 'no warning for varies sub with same message as first call' + ); +} + +{ + package Baz; + + Foo->import( -api_version => '0.01' ); + + ::stderr_is( + sub { Foo::foo() }, + q{}, + 'no warning for foo with api_version = 0.01' + ); + + ::stderr_is( + sub { Foo::bar() }, + q{}, + 'no warning for bar with api_version = 0.01' + ); + + ::stderr_is( + sub { Foo::baz() }, + q{}, + 'no warning for baz with api_version = 0.01' + ); +} + +{ + package Quux; + + Foo->import( -api_version => '1.17' ); + + ::stderr_like( + sub { Foo::foo() }, + qr/\Qfoo is deprecated/, + 'deprecation warning for foo with api_version = 1.17' + ); + + ::stderr_like( + sub { Foo::bar() }, + qr/\Qbar is deprecated/, + 'deprecation warning for bar with api_version = 1.17' + ); + + ::stderr_is( + sub { Foo::baz() }, + q{}, + 'no warning for baz with api_version = 1.17' + ); +} + +{ + package Another; + + Foo->import(); + + ::stderr_is( + sub { Foo::quux(1) }, + q{}, + 'no warning for quux(1)' + ); + + ::stderr_like( + sub { Foo::quux(10) }, + qr/\Qquux > 5 has been deprecated/, + 'got a warning for quux(10)' + ); +} + +{ + package Dep; + + use Package::DeprecationManager -deprecations => { + 'Dep::foo' => '1.00', + }, + -ignore => [ 'My::Package1', 'My::Package2' ]; + + sub foo { + deprecated('foo is deprecated'); + } +} + +{ + package Dep2; + + use Package::DeprecationManager -deprecations => { + 'Dep2::bar' => '1.00', + }, + -ignore => [qr/My::Package[12]/]; + + sub bar { + deprecated('bar is deprecated'); + } +} + +{ + package My::Package1; + + sub foo { Dep::foo() } + sub bar { Dep2::bar() } +} + +{ + package My::Package2; + + sub foo { My::Package1::foo() } + sub bar { My::Package1::bar() } +} + +{ + package My::Baz; + + ::stderr_like( + sub { My::Package2::foo() }, + qr/^foo is deprecated at t.basic\.t line \d+\.?\s+My::Baz/, + 'deprecation warning for call to My::Package2::foo() and mentions My::Baz but not My::Package[12]' + ); + + ::stderr_is( + sub { My::Package2::foo() }, + q{}, + 'no deprecation warning for second call to My::Package2::foo()' + ); + + ::stderr_is( + sub { My::Package1::foo() }, + q{}, + 'no deprecation warning for call to My::Package1::foo()' + ); + + ::stderr_like( + sub { My::Package2::bar() }, + qr/^bar is deprecated at t.basic\.t line \d+\.?\s+My::Baz/, + 'deprecation warning for call to My::Package2::foo() and mentions My::Baz but not My::Package[12]' + ); + + ::stderr_is( + sub { My::Package2::bar() }, + q{}, + 'no deprecation warning for second call to My::Package2::bar()' + ); +} + +{ + package My::Quux; + + ::stderr_like( + sub { My::Package1::foo() }, + qr/^foo is deprecated at t.basic\.t line \d+\.?\s+My::Quux/, + 'deprecation warning for call to My::Package1::foo() and mentions My::Quux but not My::Package[12]' + ); + + ::stderr_is( + sub { My::Package1::foo() }, + q{}, + 'no deprecation warning for second call to My::Package1::foo()' + ); +} + +done_testing(); diff --git a/t/release-cpan-changes.t b/t/release-cpan-changes.t new file mode 100644 index 0000000..214650f --- /dev/null +++ b/t/release-cpan-changes.t @@ -0,0 +1,19 @@ +#!perl + +BEGIN { + unless ($ENV{RELEASE_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for release candidate testing'); + } +} + + +use strict; +use warnings; + +use Test::More 0.96 tests => 2; +use_ok('Test::CPAN::Changes'); +subtest 'changes_ok' => sub { + changes_file_ok('Changes'); +}; +done_testing(); diff --git a/t/release-pod-coverage.t b/t/release-pod-coverage.t new file mode 100644 index 0000000..149bb2f --- /dev/null +++ b/t/release-pod-coverage.t @@ -0,0 +1,52 @@ +#!perl + +BEGIN { + unless ($ENV{RELEASE_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for release candidate testing'); + } +} + +# This file was automatically generated by Dist::Zilla::Plugin::Test::Pod::Coverage::Configurable. + +use Test::Pod::Coverage 1.08; +use Test::More 0.88; + +BEGIN { + if ( $] <= 5.008008 ) { + plan skip_all => 'These tests require Pod::Coverage::TrustPod, which only works with Perl 5.8.9+'; + } +} +use Pod::Coverage::TrustPod; + +my %skip = map { $_ => 1 } qw( ); + +my @modules; +for my $module ( all_modules() ) { + next if $skip{$module}; + + push @modules, $module; +} + +plan skip_all => 'All the modules we found were excluded from POD coverage test.' + unless @modules; + +plan tests => scalar @modules; + +my %trustme = (); + +my @also_private; + +for my $module ( sort @modules ) { + pod_coverage_ok( + $module, + { + coverage_class => 'Pod::Coverage::TrustPod', + also_private => \@also_private, + trustme => $trustme{$module} || [], + }, + "pod coverage for $module" + ); +} + +done_testing(); diff --git a/t/release-pod-linkcheck.t b/t/release-pod-linkcheck.t new file mode 100644 index 0000000..654cf06 --- /dev/null +++ b/t/release-pod-linkcheck.t @@ -0,0 +1,28 @@ +#!perl + +BEGIN { + unless ($ENV{RELEASE_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for release candidate testing'); + } +} + + +use strict; +use warnings; +use Test::More; + +foreach my $env_skip ( qw( + SKIP_POD_LINKCHECK +) ){ + plan skip_all => "\$ENV{$env_skip} is set, skipping" + if $ENV{$env_skip}; +} + +eval "use Test::Pod::LinkCheck"; +if ( $@ ) { + plan skip_all => 'Test::Pod::LinkCheck required for testing POD'; +} +else { + Test::Pod::LinkCheck->new->all_pod_ok; +} diff --git a/t/release-pod-no404s.t b/t/release-pod-no404s.t new file mode 100644 index 0000000..da185ec --- /dev/null +++ b/t/release-pod-no404s.t @@ -0,0 +1,29 @@ +#!perl + +BEGIN { + unless ($ENV{RELEASE_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for release candidate testing'); + } +} + + +use strict; +use warnings; +use Test::More; + +foreach my $env_skip ( qw( + SKIP_POD_NO404S + AUTOMATED_TESTING +) ){ + plan skip_all => "\$ENV{$env_skip} is set, skipping" + if $ENV{$env_skip}; +} + +eval "use Test::Pod::No404s"; +if ( $@ ) { + plan skip_all => 'Test::Pod::No404s required for testing POD'; +} +else { + all_pod_files_ok(); +} diff --git a/t/release-pod-syntax.t b/t/release-pod-syntax.t new file mode 100644 index 0000000..cdd6a6c --- /dev/null +++ b/t/release-pod-syntax.t @@ -0,0 +1,14 @@ +#!perl + +BEGIN { + unless ($ENV{RELEASE_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for release candidate testing'); + } +} + +# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. +use Test::More; +use Test::Pod 1.41; + +all_pod_files_ok(); diff --git a/t/release-portability.t b/t/release-portability.t new file mode 100644 index 0000000..ad285b4 --- /dev/null +++ b/t/release-portability.t @@ -0,0 +1,20 @@ +#!perl + +BEGIN { + unless ($ENV{RELEASE_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for release candidate testing'); + } +} + + +use strict; +use warnings; + +use Test::More; + +eval 'use Test::Portability::Files'; +plan skip_all => 'Test::Portability::Files required for testing portability' + if $@; + +run_tests(); diff --git a/t/release-test-version.t b/t/release-test-version.t new file mode 100644 index 0000000..f453957 --- /dev/null +++ b/t/release-test-version.t @@ -0,0 +1,30 @@ + +BEGIN { + unless ($ENV{RELEASE_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for release candidate testing'); + } +} + +use strict; +use warnings; +use Test::More; + +# generated by Dist::Zilla::Plugin::Test::Version 0.003001 +use Test::Version; + +my @imports = ( 'version_all_ok' ); + +my $params = { + is_strict => 1, + has_version => 1, +}; + +push @imports, $params + if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); + + +Test::Version->import(@imports); + +version_all_ok; +done_testing; diff --git a/t/release-tidyall.t b/t/release-tidyall.t new file mode 100644 index 0000000..9625e53 --- /dev/null +++ b/t/release-tidyall.t @@ -0,0 +1,17 @@ +#!perl + +BEGIN { + unless ($ENV{RELEASE_TESTING}) { + require Test::More; + Test::More::plan(skip_all => 'these tests are for release candidate testing'); + } +} + +# This file was automatically generated by Dist::Zilla::Plugin::Test::TidyAll + +use Test::Code::TidyAll 0.24; +use Test::More 0.88; + +tidyall_ok(); + +done_testing(); |