Fix driver.pl when expected value is 0 (#3339)

* Tests: use defined() to accept $expvalue==0

* Tests: Update expected stats of t_cast_huge in --vltmt mode
This commit is contained in:
Yutetsu TAKATSUKASA 2022-03-06 14:43:28 +09:00 committed by GitHub
parent 999751c422
commit e29132377e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -2434,7 +2434,7 @@ sub file_grep {
return if ($contents eq "_Already_Errored_");
if ($contents !~ /$regexp/) {
$self->error("File_grep: $filename: Regexp not found: $regexp\n");
} elsif ($expvalue && $expvalue ne $1) {
} elsif (defined($expvalue) && $expvalue ne $1) {
$self->error("File_grep: $filename: Got='$1' Expected='$expvalue' in regexp: $regexp\n");
}
}

View File

@ -16,8 +16,7 @@ compile(
if ($Self->{vlt_all}) {
file_grep($Self->{stats}, qr/Optimizations, Tables created\s+(\d+)/i, 10);
file_grep($Self->{stats}, qr/Optimizations, Combined CFuncs\s+(\d+)/i,
($Self->{vltmt} ? 0 : 8));
file_grep($Self->{stats}, qr/Optimizations, Combined CFuncs\s+(\d+)/i, 8);
}
execute(