]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/thread-index-gap.t
t/thread-index-gap: support older DBI
[public-inbox.git] / t / thread-index-gap.t
index f4e4bd09c3ad3228519e6565be9e78bd09f63df6..83c3707d21d795e55d7023ea67fcedee027524cf 100644 (file)
@@ -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)");
 }