]>
git.ipfire.org Git - thirdparty/openssl.git/blob - test/recipes/02-test_ordinals.t
2 # Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
4 # Licensed under the Apache License 2.0 (the "License"). You may not use
5 # this file except in compliance with the License. You can obtain a copy
6 # in the file LICENSE in the source distribution or at
7 # https://www.openssl.org/source/license.html
10 use OpenSSL
::Test qw
/:DEFAULT srctop_file/;
12 setup
("test_ordinals");
16 ok
(testordinals
(srctop_file
("util", "libcrypto.num")), "Test libcrypto.num");
17 ok
(testordinals
(srctop_file
("util", "libssl.num")), "Test libssl.num");
28 open(my $fh, '<', $filename);
29 while (my $line = <$fh>) {
30 my @tokens = split(/(?:\s+|\s*:\s*)/, $line);
31 #Check the line looks sane
32 if ($#tokens < 5 || $#tokens > 6) {
33 print STDERR
"Invalid line:\n$line\n";
37 if ($tokens[3] eq "NOEXIST") {
41 #Some ordinals can be repeated, e.g. if one is VMS and another is !VMS
42 $newqual = $tokens[4];
44 my $number = $tokens[1];
45 $number = $cnt + 1 if $number eq '?';
46 $number = $cnt if $number eq '?+';
48 || ($cnt == $number && ($qualifier ne $newqual
49 || $qualifier eq ""))) {
50 print STDERR
"Invalid ordinal detected: ".$tokens[1]."\n";
55 $qualifier = $newqual;
56 $lastfunc = $tokens[0];