Upgrade to Tie::RefHash 1.34, by Yuval Kogman
[p5sagit/p5-mst-13.2.git] / lib / Digest / t / digest.t
1 print "1..3\n";
2
3 use Digest;
4
5 {
6     package Digest::Dummy;
7     use vars qw($VERSION @ISA);
8     $VERSION = 1;
9
10     require Digest::base;
11     @ISA = qw(Digest::base);
12
13     sub new {
14         my $class = shift;
15         my $d = shift || "ooo";
16         bless { d => $d }, $class;
17     }
18     sub add {}
19     sub digest { shift->{d} }
20 }
21
22 my $d;
23 $d = Digest->new("Dummy");
24 print "not " unless $d->digest eq "ooo";
25 print "ok 1\n";
26
27 $d = Digest->Dummy;
28 print "not " unless $d->digest eq "ooo";
29 print "ok 2\n";
30
31 $Digest::MMAP{"Dummy-24"} = [["NotThere"], "NotThereEither", ["Digest::Dummy", 24]];
32 $d = Digest->new("Dummy-24");
33 print "not " unless $d->digest eq "24";
34 print "ok 3\n";
35
36