about summary refs log tree commit homepage
path: root/t/over.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-10-27 07:54:15 +0000
committerEric Wong <e@80x24.org>2020-11-07 10:18:44 +0000
commite1f70280eec5fc523b8d13de30249d425ff0fab7 (patch)
treea774dcae1339ebb5e38d0650c082f124f92644a8 /t/over.t
parentd72ce02b49367927003fa79d9cbb58f12f9d8955 (diff)
downloadpublic-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.t11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/over.t b/t/over.t
index 4c8f8098..3e2860f8 100644
--- a/t/over.t
+++ b/t/over.t
@@ -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();