File: 00-signature.t

package info (click to toggle)
libposix-strptime-perl 0.13-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 264 kB
  • sloc: perl: 37; makefile: 5
file content (28 lines) | stat: -rw-r--r-- 769 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/perl

use strict;
print "1..1\n";

if ( !$ENV{TEST_SIGNATURE} ) {
    print "ok 1 # skip Set the environment variable",
      " TEST_SIGNATURE to enable this test\n";
}
elsif ( !-s 'SIGNATURE' ) {
    print "ok 1 # skip No signature file found\n";
}
elsif ( !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";
}
elsif ( !eval { require Socket; Socket::inet_aton('pool.sks-keyservers.net') } )
{
    print "ok 1 # skip ", "Cannot connect to the keyserver\n";
}
else {
    ( Module::Signature::verify() == Module::Signature::SIGNATURE_OK() )
      or print "not ";
    print "ok 1 # Valid signature\n";
}

__END__