File: 1basic.t

package info (click to toggle)
libio-digest-perl 0.11-5
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 200 kB
  • sloc: perl: 1,376; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 384 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl -w
use Test::More tests => 3;
use IO::Digest;

my $digest = IO::Digest->new (\*STDOUT, 'MD5');

print "fsck\n";
is ($digest->hexdigest, 'b4fd7568bef9cde663dee6e029bf04ec');

print "fsck\nfsck\n";
is ($digest->hexdigest, 'cde05cba57ea689e1dd96304759d0184');

eval {
$digest = IO::Digest->new (\*STDOUT, 'CLKAO'); # I don't think there will be Digest::CLKAO
};
ok ($@);