Commit | Line | Data |
6bc89f92 |
1 | use Test; |
2 | use strict; |
3 | use integer; |
4 | use Digest::SHA qw(sha1_hex); |
5 | |
41c686de |
6 | BEGIN { |
77d2a621 |
7 | if ($ENV{PERL_CORE}) { |
8 | chdir 't' if -d 't'; |
9 | @INC = '../lib'; |
10 | } |
41c686de |
11 | } |
12 | |
6bc89f92 |
13 | my(@vec, @rsp); |
14 | |
15 | BEGIN { |
16 | @vec = ( |
17 | "abc", |
18 | "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", |
19 | "a" x 1000000 |
20 | ); |
21 | |
22 | @rsp = ( |
23 | "a9993e364706816aba3e25717850c26c9cd0d89d", |
24 | "84983e441c3bd26ebaae4aa1f95129e5e54670f1", |
25 | "34aa973cd4c4daa4f61eeb2bdbad27316534016f" |
26 | ); |
27 | |
28 | plan tests => scalar(@vec); |
29 | } |
30 | |
31 | for (my $i = 0; $i < @vec; $i++) { |
32 | ok(sha1_hex($vec[$i]), $rsp[$i]); |
33 | } |