X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fover.t;fp=t%2Fover.t;h=734fdaa3604a55dd1da7df9ddb67ad48bd52c345;hb=d0dcab33e0b02bf3299deea40f96ef5fff10fe73;hp=5586aa310e6b2318946e25b0c4823e19d3069781;hpb=56e4554469fb86c2cac63d9eabaffa64c531e835;p=public-inbox.git diff --git a/t/over.t b/t/over.t index 5586aa31..734fdaa3 100644 --- a/t/over.t +++ b/t/over.t @@ -10,6 +10,8 @@ use_ok 'PublicInbox::OverIdx'; my ($tmpdir, $for_destroy) = tmpdir(); my $over = PublicInbox::OverIdx->new("$tmpdir/over.sqlite3"); $over->connect; +is($over->max, 0, 'max is zero on new DB (scalar context)'); +is_deeply([$over->max], [0], 'max is zero on new DB (list context)'); my $x = $over->next_tid; is(int($x), $x, 'integer tid'); my $y = $over->next_tid; @@ -58,6 +60,7 @@ foreach my $mid (qw(a b)) { my $msgs = [ map { $_->{num} } @{$over->get_thread($mid)} ]; is_deeply([98, 99], $msgs, "linked messages by Message-ID: <$mid>"); } +isnt($over->max, 0, 'max is non-zero'); $over->rollback_lazy;