diff options
author | Eric Wong <e@80x24.org> | 2020-10-27 07:54:15 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-11-07 10:18:44 +0000 |
commit | e1f70280eec5fc523b8d13de30249d425ff0fab7 (patch) | |
tree | a774dcae1339ebb5e38d0650c082f124f92644a8 /t/over.t | |
parent | d72ce02b49367927003fa79d9cbb58f12f9d8955 (diff) | |
download | public-inbox-e1f70280eec5fc523b8d13de30249d425ff0fab7.tar.gz |
Since external indices won't have msgmap.sqlite3, we'll need to store last_commit-* metadata in over.sqlite3 instead. This has a longer limits to account for path names or newsgroup names stored in keys. We'll also rely on built-in counters for Xapian document IDs, since msgmap.sqlite3 no longer provides an AUTOINCREMENT column.
Diffstat (limited to 't/over.t')
-rw-r--r-- | t/over.t | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -74,4 +74,15 @@ SKIP: { 'WAL journal_mode not clobbered if manually set'); } +# ext index additions +{ + my $hex = 'deadbeefcafe'; + my $n = $over->oid_add($hex); + ok($n > 0, 'oid_add returned number'); + is($over->oid2num($hex), $n, 'oid2num works'); + my $n2 = $over->oid_add($hex.$hex); + ok($n2 > $n, 'oid_add increments'); + is($over->oid2num($hex.$hex), $n2, 'oid2num works again'); +} + done_testing(); |