提交 ea09088e 编写于 作者: R Richard Levitte

Better splitting regexp for test_ordinals

Reviewed-by: NMatt Caswell <matt@openssl.org>
上级 2ab96874
......@@ -73,28 +73,28 @@ sub testordinals
open(my $fh, '<', $filename);
while (my $line = <$fh>) {
my @tokens = split(/( |\t|:)+/, $line);
my @tokens = split(/(?:\s+|\s*:\s*)/, $line);
#Check the line looks sane
if ($#tokens < 8 || $#tokens > 10) {
if ($#tokens < 4 || $#tokens > 5) {
print STDERR "Invalid line:\n$line\n";
$ret = 0;
last;
}
if ($tokens[4] eq "NOEXIST") {
if ($tokens[2] eq "NOEXIST") {
#Ignore this line
next;
}
#Some ordinals can be repeated, e.g. if one is VMS and another is !VMS
$newqual = $tokens[6];
$newqual = $tokens[3];
$newqual =~ s/!//g;
if ($cnt > $tokens[2]
|| ($cnt == $tokens[2] && ($qualifier ne $newqual
if ($cnt > $tokens[1]
|| ($cnt == $tokens[1] && ($qualifier ne $newqual
|| $qualifier eq "FUNCTION"))) {
print STDERR "Invalid ordinal detected: ".$tokens[2]."\n";
print STDERR "Invalid ordinal detected: ".$tokens[1]."\n";
$ret = 0;
last;
}
$cnt = $tokens[2];
$cnt = $tokens[1];
$qualifier = $newqual;
$lastfunc = $tokens[0];
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册