summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/cpan/Digest-SHA/t/inheritance.t
blob: 5880e6e8dd917bc4b7ce26eb279bb8cfeb31f82e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Adapted from script by Mark Lawrence (ref. rt.cpan.org #94830)

use strict;
use Digest::SHA qw(sha1);

package P1;
use vars qw(@ISA);
@ISA = ("Digest::SHA");

package main;

print "1..1\n";

my $data = 'a';
my $d = P1->new;
print "not " unless $d->add($data)->digest eq sha1($data);
print "ok 1\n";