File: add.t

package info (click to toggle)
libdigest-whirlpool-perl 1.09-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 448 kB
  • sloc: ansic: 1,646; perl: 175; makefile: 51
file content (23 lines) | stat: -rw-r--r-- 421 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use strict;

use Test::More tests => 3;

use Digest::Whirlpool;

{
    local $@;
    eval { Digest::Whirlpool::add };
    like $@, qr/\(self/, "add as a non-oo method";
}

my $whirlpool = Digest::Whirlpool->new;

$whirlpool->add( "a" );

like $whirlpool->clone->hexdigest, qr/^8aca/, "adding one item";

$whirlpool->add( qw< b c > );

like $whirlpool->clone->hexdigest, qr/^4e244/, "adding two items to the first one";