diff options
Diffstat (limited to 'xt/author')
-rw-r--r-- | xt/author/00-compile.t | 51 | ||||
-rw-r--r-- | xt/author/clean-namespaces.t | 11 | ||||
-rw-r--r-- | xt/author/eol.t | 19 | ||||
-rw-r--r-- | xt/author/no-tabs.t | 34 | ||||
-rw-r--r-- | xt/author/pod-spell.t | 39 |
5 files changed, 154 insertions, 0 deletions
diff --git a/xt/author/00-compile.t b/xt/author/00-compile.t new file mode 100644 index 0000000..4844718 --- /dev/null +++ b/xt/author/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 0.94; + +plan tests => 2; + +my @module_files = ( + 'Sub/Name.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: ', explain(\@warnings); + +BAIL_OUT("Compilation problems") if !Test::More->builder->is_passing; diff --git a/xt/author/clean-namespaces.t b/xt/author/clean-namespaces.t new file mode 100644 index 0000000..36387da --- /dev/null +++ b/xt/author/clean-namespaces.t @@ -0,0 +1,11 @@ +use strict; +use warnings; + +# this test was generated with Dist::Zilla::Plugin::Test::CleanNamespaces 0.006 + +use Test::More 0.94; +use Test::CleanNamespaces 0.15; + +subtest all_namespaces_clean => sub { all_namespaces_clean() }; + +done_testing; diff --git a/xt/author/eol.t b/xt/author/eol.t new file mode 100644 index 0000000..b7ca82a --- /dev/null +++ b/xt/author/eol.t @@ -0,0 +1,19 @@ +use strict; +use warnings; + +# this test was generated with Dist::Zilla::Plugin::Test::EOL 0.18 + +use Test::More 0.88; +use Test::EOL; + +my @files = ( + 'lib/Sub/Name.pm', + 't/00-report-prereqs.dd', + 't/00-report-prereqs.t', + 't/RT42725_deparse.t', + 't/RT96893_perlcc.t', + 't/smoke.t' +); + +eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; +done_testing; diff --git a/xt/author/no-tabs.t b/xt/author/no-tabs.t new file mode 100644 index 0000000..218d2b6 --- /dev/null +++ b/xt/author/no-tabs.t @@ -0,0 +1,34 @@ +use strict; +use warnings; + +# this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.14 + +use Test::More 0.88; +use Test::NoTabs; + +my @files = ( + 'lib/Sub/Name.pm', + 't/00-report-prereqs.dd', + 't/00-report-prereqs.t', + 't/RT42725_deparse.t', + 't/RT96893_perlcc.t', + 't/smoke.t', + 'xt/author/00-compile.t', + 'xt/author/clean-namespaces.t', + 'xt/author/eol.t', + 'xt/author/no-tabs.t', + 'xt/author/pod-spell.t', + 'xt/release/changes_has_content.t', + 'xt/release/cpan-changes.t', + 'xt/release/distmeta.t', + 'xt/release/kwalitee.t', + 'xt/release/minimum-version.t', + 'xt/release/mojibake.t', + 'xt/release/pod-coverage.t', + 'xt/release/pod-no404s.t', + 'xt/release/pod-syntax.t', + 'xt/release/portability.t' +); + +notabs_ok($_) foreach @files; +done_testing; diff --git a/xt/author/pod-spell.t b/xt/author/pod-spell.t new file mode 100644 index 0000000..60e63bc --- /dev/null +++ b/xt/author/pod-spell.t @@ -0,0 +1,39 @@ +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__ +Matthijs +van +Duin +xmath +and +cPanel +Inc +Karen +Etheridge +ether +Florian +Ragwitz +rafl +Reini +Urban +rurban +Dagfinn +Ilmari +Mannsåker +ilmari +gfx +gfuji +Mash +jmash +lib +Sub +Name |