Commit | Line | Data |
---|---|---|
6bc89f92 | 1 | use Test; |
2 | use Digest::SHA qw(sha1); | |
3 | use strict; | |
4 | use integer; | |
77d2a621 | 5 | |
41c686de | 6 | BEGIN { |
77d2a621 | 7 | if ($ENV{PERL_CORE}) { |
8 | chdir 't' if -d 't'; | |
9 | @INC = '../lib'; | |
10 | } | |
41c686de | 11 | } |
6bc89f92 | 12 | |
13 | my(@vec, @rsp); | |
14 | ||
77d2a621 | 15 | BEGIN { |
6bc89f92 | 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 | } |