From e29132377ecf3d6fdaa093f547ea8b63ae751f94 Mon Sep 17 00:00:00 2001 From: Yutetsu TAKATSUKASA Date: Sun, 6 Mar 2022 14:43:28 +0900 Subject: [PATCH] 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 --- test_regress/driver.pl | 2 +- test_regress/t/t_case_huge.pl | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test_regress/driver.pl b/test_regress/driver.pl index 54314bae6..48b6d9539 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -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"); } } diff --git a/test_regress/t/t_case_huge.pl b/test_regress/t/t_case_huge.pl index b8b37ebdc..73bc861e6 100755 --- a/test_regress/t/t_case_huge.pl +++ b/test_regress/t/t_case_huge.pl @@ -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(