diff options
Diffstat (limited to 'cpan/Digest/t/digest.t')
-rw-r--r-- | cpan/Digest/t/digest.t | 36 |
1 files changed, 11 insertions, 25 deletions
diff --git a/cpan/Digest/t/digest.t b/cpan/Digest/t/digest.t index c5da8f02c8..81260277f4 100644 --- a/cpan/Digest/t/digest.t +++ b/cpan/Digest/t/digest.t @@ -1,36 +1,22 @@ -print "1..3\n"; +#!/usr/bin/env perl -use Digest; - -{ - package Digest::Dummy; - use vars qw($VERSION @ISA); - $VERSION = 1; +use strict; +use Test::More tests => 4; - require Digest::base; - @ISA = qw(Digest::base); +# To find Digest::Dummy +use lib 't/lib'; - sub new { - my $class = shift; - my $d = shift || "ooo"; - bless { d => $d }, $class; - } - sub add {} - sub digest { shift->{d} } -} +use Digest; +$@ = "rt#50663"; my $d; $d = Digest->new("Dummy"); -print "not " unless $d->digest eq "ooo"; -print "ok 1\n"; +is $@, "rt#50663"; +is $d->digest, "ooo"; $d = Digest->Dummy; -print "not " unless $d->digest eq "ooo"; -print "ok 2\n"; +is $d->digest, "ooo"; $Digest::MMAP{"Dummy-24"} = [["NotThere"], "NotThereEither", ["Digest::Dummy", 24]]; $d = Digest->new("Dummy-24"); -print "not " unless $d->digest eq "24"; -print "ok 3\n"; - - +is $d->digest, "24"; |