From 64f75cb87427b574f8d84888683f43ba5c99cf6b Mon Sep 17 00:00:00 2001 From: Nigel Horne Date: Tue, 14 May 2024 20:36:36 -0400 Subject: [PATCH] use AUTHOR_TESTING instead of RELEASE_TESTING --- MANIFEST | 2 +- t/pod-snippets.t | 16 ++++++++++++++++ t/snippets.t | 22 ---------------------- 3 files changed, 17 insertions(+), 23 deletions(-) create mode 100644 t/pod-snippets.t delete mode 100644 t/snippets.t diff --git a/MANIFEST b/MANIFEST index 56a9437..f34327a 100644 --- a/MANIFEST +++ b/MANIFEST @@ -40,12 +40,12 @@ t/opencage.t t/osm.t t/ovi.t t/pod-cm.t +t/pod-snippets.t t/pod-spelling.t t/pod-synopsis.t t/pod.t t/postcodes.t t/rand.t -t/snippets.t t/ua.t t/unused.t t/us.t diff --git a/t/pod-snippets.t b/t/pod-snippets.t new file mode 100644 index 0000000..7082423 --- /dev/null +++ b/t/pod-snippets.t @@ -0,0 +1,16 @@ +#!perl -wT + +use strict; +use warnings; +use Test::Most; +use Test::Needs 'Test::Pod::Snippets'; + +if($ENV{'AUTHOR_TESTING'}) { + my @modules = qw/ Geo::Coder::List /; + Test::Pod::Snippets->import(); + Test::Pod::Snippets->new()->runtest(module => $_, testgroup => 1) for @modules; + + done_testing(); +} else { + plan(skip_all => 'Author tests not required for installation'); +} diff --git a/t/snippets.t b/t/snippets.t deleted file mode 100644 index 9fc2f0c..0000000 --- a/t/snippets.t +++ /dev/null @@ -1,22 +0,0 @@ -#!perl -wT - -use strict; -use warnings; -use File::Spec; -use Test::Most; - -if(not $ENV{RELEASE_TESTING}) { - plan(skip_all => 'Author tests not required for installation'); -} - -eval "use Test::Pod::Snippets"; - -if($@) { - plan skip_all => 'Test::Pod::Snippets required for testing POD code snippets'; -} else { - my $tps = Test::Pod::Snippets->new; - - my @modules = qw/ Geo::Coder::List /; - - $tps->runtest( module => $_, testgroup => 1 ) for @modules; -}