Skip to content

Commit c7e42cc

Browse files
palichoroba
authored andcommitted
Fix test t/10connect.t for Embedded server
Attribute $dbh->{mariadb_protoinfo} returns number 0 and attribute $dbh->{mariadb_stat} returns empty string "". So fix t/10connect.t test to check that $dbh attributes are defined, instead of being true in boolean context.
1 parent 6986835 commit c7e42cc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

t/10connect.t

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ for my $attribute ( qw(
3232
mariadb_stat
3333
mariadb_protoinfo
3434
) ) {
35-
ok($dbh->{$attribute}, "Value of '$attribute'");
36-
diag "$attribute is: ". $dbh->{$attribute};
35+
my $value = $dbh->{$attribute};
36+
ok(defined $value, "Value of '$attribute'");
37+
diag "$attribute is: ". (defined $value ? $value : "(undef)");
3738
}
3839

3940
my $sql_dbms_name = $dbh->get_info($GetInfoType{SQL_DBMS_NAME});

0 commit comments

Comments
 (0)