Commit | Line | Data |
6bc89f92 |
1 | use Test; |
2 | use strict; |
3 | use integer; |
4 | use Digest::SHA qw(sha384_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 | |
77d2a621 |
15 | BEGIN { |
6bc89f92 |
16 | @vec = ( |
17 | "abc", |
18 | "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", |
19 | "a" x 1000000 |
20 | ); |
21 | |
22 | @rsp = ( |
23 | "cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7", |
24 | "09330c33f71147e83d192fc782cd1b4753111b173b3b05d22fa08086e3b0f712fcc7c71a557e2db966c3e9fa91746039", |
25 | "9d0e1809716474cb086e834e310a4a1ced149e9c00f248527972cec5704c2a5b07b8b3dc38ecc4ebae97ddd87f3d8985" |
26 | ); |
27 | |
77d2a621 |
28 | plan tests => scalar(@vec); |
6bc89f92 |
29 | } |
30 | |
31 | my $skip = sha384_hex("") ? 0 : 1; |
32 | |
33 | for (my $i = 0; $i < @vec; $i++) { |
34 | skip($skip, sha384_hex($vec[$i]), $rsp[$i]); |
35 | } |