From cbc7b2da89fed4167db14a35664b5876b772f8d2 Mon Sep 17 00:00:00 2001 From: Gabor Szabo Date: Fri, 17 Feb 2012 12:30:29 +0200 Subject: [PATCH] use Test::More and skip the signature verification --- Changes | 3 +++ t/0-signature.t | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Changes b/Changes index bd529bf..4b36f3c 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Perl extension Term-ProgressBar. +2.11 + - skip the signature verification + 2.10 Wed Dec 21 11:18:26 2011 - remove Build.PL (keep the Makefile.PL only) - Replace home-made testing tools with CPAN-ish tools diff --git a/t/0-signature.t b/t/0-signature.t index 9de4488..e4713ee 100644 --- a/t/0-signature.t +++ b/t/0-signature.t @@ -1,16 +1,18 @@ #!/usr/bin/perl use strict; -print "1..1\n"; +use warnings; + +use Test::More; + +plan skip_all => 'Signature has not been updated'; + if ( ! eval { require Module::Signature; 1 } ) { - print("ok 1 # skip ", - "Next time around, consider install Module::Signature, ", - "# so you can verify the integrity of this distribution.\n"); + plan skip_all => 'Needs Module::Signature to verify the integrity of this distribution.'; } elsif ( ! eval { require Socket; Socket::inet_aton('pgp.mit.edu') } ) { - print "ok 1 # skip ", "Cannot connect to the keyserver\n"; + plan skip_all => 'Cannot connect to the keyserver'; } else { - (Module::Signature::verify() == Module::Signature::SIGNATURE_OK()) - or print "not "; - print "ok 1 # Valid signature\n"; + plan tests => 1; + is Module::Signature::verify(), Module::Signature::SIGNATURE_OK(), 'Valid signature'; } -- 2.39.2