projects
/
p5sagit/p5-mst-13.2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Upgrade to Digest-SHA-5.43
[p5sagit/p5-mst-13.2.git]
/
ext
/
Digest
/
SHA
/
t
/
1-hello-world.t
1
use Test;
2
use Digest::SHA qw(sha1);
3
use strict;
4
use integer;
5
6
BEGIN {
7
if ($ENV{PERL_CORE}) {
8
chdir 't' if -d 't';
9
@INC = '../lib';
10
}
11
}
12
13
my(@vec, @rsp);
14
15
BEGIN {
16
17
@vec = ( "hello world" );
18
19
@rsp = ( pack("H*", "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed") );
20
21
plan tests => scalar(@vec);
22
23
}
24
25
for (my $i = 0; $i < @vec; $i++) {
26
ok(sha1($vec[$i]), $rsp[$i]);
27
}