X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=test%2Frecipes%2F02-test_ordinals.t;h=710e7e23240f14978eaf150dc19b49bc7f76ecff;hp=473d05b01446182f745c7f352913bd0e72342f51;hb=6af1b11848f000c900877f1289a42948d415f21c;hpb=d734582275aa29ef839af2130ae84af20b84425e diff --git a/test/recipes/02-test_ordinals.t b/test/recipes/02-test_ordinals.t index 473d05b014..710e7e2324 100644 --- a/test/recipes/02-test_ordinals.t +++ b/test/recipes/02-test_ordinals.t @@ -1,7 +1,7 @@ #! /usr/bin/env perl # Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. # -# Licensed under the OpenSSL license (the "License"). You may not use +# Licensed under the Apache License 2.0 (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy # in the file LICENSE in the source distribution or at # https://www.openssl.org/source/license.html @@ -41,8 +41,11 @@ sub testordinals #Some ordinals can be repeated, e.g. if one is VMS and another is !VMS $newqual = $tokens[4]; $newqual =~ s/!//g; - if ($cnt > $tokens[1] - || ($cnt == $tokens[1] && ($qualifier ne $newqual + my $number = $tokens[1]; + $number = $cnt + 1 if $number eq '?'; + $number = $cnt if $number eq '?+'; + if ($cnt > $number + || ($cnt == $number && ($qualifier ne $newqual || $qualifier eq ""))) { print STDERR "Invalid ordinal detected: ".$tokens[1]."\n"; $ret = 0;