From: Eric Wong Date: Sun, 17 Jan 2021 07:09:57 +0000 (+0000) Subject: t/thread-index-gap: support older DBI X-Git-Tag: v1.7.0~1360 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=2d7de5a87e1b4f5a5046161c8fd3b7f0085a5c19;p=public-inbox.git t/thread-index-gap: support older DBI ...by avoiding selectall_array in favor of selectall_arrayref. Tested with DBI 1.627. --- diff --git a/t/thread-index-gap.t b/t/thread-index-gap.t index f4e4bd09..83c3707d 100644 --- a/t/thread-index-gap.t +++ b/t/thread-index-gap.t @@ -45,12 +45,15 @@ for my $msgs (['orig', reverse @msgs], ['shuffle', shuffle(@msgs)]) { } $im->done; my $over = $ibx->over; - my @tid = $over->dbh->selectall_array('SELECT DISTINCT(tid) FROM over'); + my $dbh = $over->dbh; + my $tid = $dbh->selectall_arrayref('SELECT DISTINCT(tid) FROM over'); + my @tid = map { $_->[0] } @$tid; is(scalar(@tid), 1, "only one thread initially ($desc)"); $over->dbh_close; run_script([qw(-index --reindex --rethread), $ibx->{inboxdir}]) or BAIL_OUT 'rethread'; - @tid = $over->dbh->selectall_array('SELECT DISTINCT(tid) FROM over'); + $tid = $dbh->selectall_arrayref('SELECT DISTINCT(tid) FROM over'); + @tid = map { $_->[0] } @$tid; is(scalar(@tid), 1, "only one thread after rethread ($desc)"); }