From: Graham Knop Date: Tue, 8 May 2018 12:17:08 +0000 (+0200) Subject: move author tests to xt and remove environment conditional X-Git-Tag: v0.10014~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cc645e6199e971648826645d44c6e4c5ae7db72f;p=p5sagit%2FClass-Accessor-Grouped.git move author tests to xt and remove environment conditional --- diff --git a/t/manifest.t b/t/manifest.t deleted file mode 100644 index b0e7df0..0000000 --- a/t/manifest.t +++ /dev/null @@ -1,20 +0,0 @@ -use strict; -use warnings; - -BEGIN { - use lib 't/lib'; - use Test::More; - - plan skip_all => 'set TEST_AUTHOR to enable this test' unless $ENV{TEST_AUTHOR}; - - eval 'use Test::CheckManifest 0.09'; - if($@) { - plan skip_all => 'Test::CheckManifest 0.09 not installed'; - }; -}; - -ok_manifest({ - exclude => ['/t/var', '/cover_db'], - filter => [qr/\.(svn|git)/, qr/cover/, qr/Build(.(PL|bat))?/, qr/_build/, qr/\.DS_Store/], - bool => 'or' -}); diff --git a/t/pod_coverage.t b/t/pod_coverage.t deleted file mode 100644 index d1d34d6..0000000 --- a/t/pod_coverage.t +++ /dev/null @@ -1,21 +0,0 @@ -use strict; -use warnings; - -BEGIN { - use lib 't/lib'; - use Test::More; - - plan skip_all => 'set TEST_AUTHOR to enable this test' unless $ENV{TEST_AUTHOR}; - - eval 'use Test::Pod::Coverage 1.04'; - plan skip_all => 'Test::Pod::Coverage 1.04' if $@; - - eval 'use Pod::Coverage 0.14'; - plan skip_all => 'Pod::Coverage 0.14 not installed' if $@; -}; - -my $trustme = { - trustme => [qr/^(g|s)et_component_class$/] -}; - -all_pod_coverage_ok($trustme); diff --git a/t/pod_syntax.t b/t/pod_syntax.t deleted file mode 100644 index 6791d5d..0000000 --- a/t/pod_syntax.t +++ /dev/null @@ -1,14 +0,0 @@ -use strict; -use warnings; - -BEGIN { - use lib 't/lib'; - use Test::More; - - plan skip_all => 'set TEST_AUTHOR to enable this test' unless $ENV{TEST_AUTHOR}; - - eval 'use Test::Pod 1.00'; - plan skip_all => 'Test::Pod 1.00 not installed' if $@; -}; - -all_pod_files_ok(); diff --git a/t/style_no_tabs.t b/t/style_no_tabs.t deleted file mode 100644 index 0c6986d..0000000 --- a/t/style_no_tabs.t +++ /dev/null @@ -1,13 +0,0 @@ -use strict; -use warnings; - -BEGIN { - use Test::More; - - plan skip_all => 'set TEST_AUTHOR to enable this test' unless $ENV{TEST_AUTHOR}; - - eval 'use Test::NoTabs 0.03'; - plan skip_all => 'Test::NoTabs 0.03 not installed' if $@; -}; - -all_perl_files_ok('lib'); diff --git a/xt/manifest.t b/xt/manifest.t new file mode 100644 index 0000000..23a1ec4 --- /dev/null +++ b/xt/manifest.t @@ -0,0 +1,13 @@ +use strict; +use warnings; +use Test::More; +BEGIN { + eval 'use Test::CheckManifest 0.09; 1' + or plan skip_all => 'Test::CheckManifest 0.09 not installed'; +} + +ok_manifest({ + exclude => ['/t/var', '/cover_db'], + filter => [qr/\.(svn|git)/, qr/cover/, qr/Build(.(PL|bat))?/, qr/_build/, qr/\.DS_Store/], + bool => 'or' +}); diff --git a/xt/pod_coverage.t b/xt/pod_coverage.t new file mode 100644 index 0000000..6801889 --- /dev/null +++ b/xt/pod_coverage.t @@ -0,0 +1,16 @@ +use strict; +use warnings; +use Test::More; +BEGIN { + eval 'use Test::Pod::Coverage 1.04; 1' or + plan skip_all => 'Test::Pod::Coverage 1.04 not installed'; + + eval 'use Pod::Coverage 0.14; 1' + or plan skip_all => 'Pod::Coverage 0.14 not installed'; +} + +my $trustme = { + trustme => [qr/^(g|s)et_component_class$/] +}; + +all_pod_coverage_ok($trustme); diff --git a/t/pod_spelling.t b/xt/pod_spelling.t similarity index 59% rename from t/pod_spelling.t rename to xt/pod_spelling.t index b7a9840..9b7043e 100644 --- a/t/pod_spelling.t +++ b/xt/pod_spelling.t @@ -1,15 +1,10 @@ use strict; use warnings; - +use Test::More; BEGIN { - use lib 't/lib'; - use Test::More; - - plan skip_all => 'set TEST_AUTHOR to enable this test' unless $ENV{TEST_AUTHOR}; - - eval 'use Test::Spelling 0.11'; - plan skip_all => 'Test::Spelling 0.11 not installed' if $@; -}; + eval 'use Test::Spelling 0.11; 1' + or plan skip_all => 'Test::Spelling 0.11 not installed'; +} set_spell_cmd('aspell list'); @@ -48,4 +43,4 @@ fREW frew getter subclasses -Benchmarking \ No newline at end of file +Benchmarking diff --git a/xt/pod_syntax.t b/xt/pod_syntax.t new file mode 100644 index 0000000..4e9b25a --- /dev/null +++ b/xt/pod_syntax.t @@ -0,0 +1,9 @@ +use strict; +use warnings; +use Test::More; +BEGIN { + eval 'use Test::Pod 1.00; 1' + or plan skip_all => 'Test::Pod 1.00 not installed'; +} + +all_pod_files_ok(); diff --git a/t/strict.t b/xt/strict.t similarity index 76% rename from t/strict.t rename to xt/strict.t index fb8b401..60093a1 100644 --- a/t/strict.t +++ b/xt/strict.t @@ -1,18 +1,18 @@ use strict; use warnings; +use Test::More; BEGIN { - use lib 't/lib'; - use Test::More; - use File::Find; - use File::Basename; + plan skip_all => 'Need untaint in newer File::Find' if $] <= 5.006; +} - plan skip_all => 'set TEST_AUTHOR to enable this test' unless $ENV{TEST_AUTHOR}; +BEGIN { + eval 'use Test::Strict; 1' + or plan skip_all => 'Test::Strict not installed'; +} - eval 'use Test::Strict'; - plan skip_all => 'Test::Strict not installed' if $@; - plan skip_all => 'Need untaint in newer File::Find' if $] <= 5.006; -}; +use File::Find; +use File::Basename; ## I hope this can go away if Test::Strict or File::Find::Rule ## finally run under -T. Until then, I'm on my own here. ;-) @@ -49,4 +49,4 @@ if (scalar @files) { foreach (@files) { strict_ok($_); -}; +} diff --git a/xt/style_no_tabs.t b/xt/style_no_tabs.t new file mode 100644 index 0000000..bdf6c09 --- /dev/null +++ b/xt/style_no_tabs.t @@ -0,0 +1,9 @@ +use strict; +use warnings; +use Test::More; +BEGIN { + eval 'use Test::NoTabs 0.03; 1' + or plan skip_all => 'Test::NoTabs 0.03 not installed'; +} + +all_perl_files_ok('lib'); diff --git a/t/warnings.t b/xt/warnings.t similarity index 75% rename from t/warnings.t rename to xt/warnings.t index 903837e..2e937eb 100644 --- a/t/warnings.t +++ b/xt/warnings.t @@ -1,18 +1,18 @@ use strict; use warnings; +use Test::More; BEGIN { - use lib 't/lib'; - use Test::More; - use File::Find; - use File::Basename; + plan skip_all => 'Need untaint in newer File::Find' if $] <= 5.006; +} - plan skip_all => 'set TEST_AUTHOR to enable this test' unless $ENV{TEST_AUTHOR}; +BEGIN { + eval 'use Test::Strict 0.05; 1' + or plan skip_all => 'Test::Strict 0.05 not installed'; +} - eval 'use Test::Strict 0.05'; - plan skip_all => 'Test::Strict 0.05 not installed' if $@; - plan skip_all => 'Need untaint in newer File::Find' if $] <= 5.006; -}; +use File::Find; +use File::Basename; ## I hope this can go away if Test::Strict or File::Find::Rule ## finally run under -T. Until then, I'm on my own here. ;-) @@ -49,4 +49,4 @@ if (scalar @files) { foreach (@files) { warnings_ok($_); -}; +}