test/recipes/02-test_ordinals.t: Take '?' and '?+' into account
authorRichard Levitte <levitte@openssl.org>
Mon, 4 Nov 2019 10:41:01 +0000 (11:41 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 5 Nov 2019 21:44:21 +0000 (22:44 +0100)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/10348)

test/recipes/02-test_ordinals.t

index 16d3877..710e7e2 100644 (file)
@@ -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;