about summary refs log tree commit
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2014-10-23 08:22:44 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2014-10-28 08:30:52 +0000
commit3ff38f3df06eafce8e612667cf5f8e0c91139e53 (patch)
tree2c1bed33b23171d03512d5a2e0a26211a00f5d99
parent8d2eb7d15fc913cbe51598ae22c7c89a61b6316c (diff)
downloadperl-libnet-3ff38f3df06eafce8e612667cf5f8e0c91139e53.tar.gz
Add optional Changes testing (skipped unless AUTHOR_TESTING)
-rw-r--r--Changes2
-rw-r--r--MANIFEST1
-rw-r--r--t/changes.t46
3 files changed, 49 insertions, 0 deletions
diff --git a/Changes b/Changes
index 0322c72..c4d78b4 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,8 @@ Revision history for Perl distribution libnet
 
 3.03 Development
 
+    - Added optional Changes testing (skipped unless AUTHOR_TESTING).
+
     - Reformatted Changes file as per CPAN::Changes::Spec.
 
 3.02 2014-10-10
diff --git a/MANIFEST b/MANIFEST
index d5a9bcd..38ce0b0 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -25,6 +25,7 @@ lib/Net/POP3.pm                          Post Office Protocol
 lib/Net/SMTP.pm                          Simple Mail Transfer Protocol Client
 lib/Net/Time.pm                          time & nettime protocols
 lib/Net/libnetFAQ.pod
+t/changes.t
 t/config.t
 t/critic.t
 t/datasend.t
diff --git a/t/changes.t b/t/changes.t
new file mode 100644
index 0000000..7cb6378
--- /dev/null
+++ b/t/changes.t
@@ -0,0 +1,46 @@
+#!perl
+#===============================================================================
+#
+# t/changes.t
+#
+# DESCRIPTION
+#   Test script to check CPAN::Changes conformance.
+#
+# COPYRIGHT
+#   Copyright (C) 2014 Steve Hay.  All rights reserved.
+#
+# LICENCE
+#   You may distribute under the terms of either the GNU General Public License
+#   or the Artistic License, as specified in the LICENCE file.
+#
+#===============================================================================
+
+use 5.008001;
+
+use strict;
+use warnings;
+
+use Test::More;
+
+#===============================================================================
+# MAIN PROGRAM
+#===============================================================================
+
+MAIN: {
+    plan skip_all => 'Author testing only' unless $ENV{AUTHOR_TESTING};
+
+    my $ok = eval {
+        require Test::CPAN::Changes;
+        Test::CPAN::Changes->import();
+        1;
+    };
+
+    if (not $ok) {
+        plan skip_all => 'Test::CPAN::Changes required to test Changes';
+    }
+    else {
+        changes_ok();
+    }
+}
+
+#===============================================================================