about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-10-14 03:12:25 +0000
committerEric Wong <e@80x24.org>2021-10-14 09:07:14 +0000
commitc8b441f4ddcb9f6cbbe54cd380fe89586d023124 (patch)
tree2d63566131a6a465841ca330d24f4c05507304cf /t
parentc485036d0b1ce7ed94ea02f84a8a5cd86144ad02 (diff)
downloadpublic-inbox-c8b441f4ddcb9f6cbbe54cd380fe89586d023124.tar.gz
Inbox->xdb does not exist, but this code path was apparently
never tested :x  I noticed this on basic v2 inbox, but it could
happen with any v1/v2 inbox.  Move ->num2docid into Search
so it's less awkward to use.
Diffstat (limited to 't')
-rw-r--r--t/lei-mirror.t6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/lei-mirror.t b/t/lei-mirror.t
index 294eb654..646ff2b1 100644
--- a/t/lei-mirror.t
+++ b/t/lei-mirror.t
@@ -176,6 +176,12 @@ SKIP: {
         $f = "$d/t2/msgmap.sqlite3";
         $ca = PublicInbox::Msgmap->new_file($f)->created_at;
         is($ca, $created{v2}, 'clone + index v1 synced ->created_at');
+        test_lei(sub {
+                lei_ok qw(inspect num:1 --dir), "$d/t1";
+                ok(ref(json_utf8->decode($lei_out)), 'inspect num: on v1');
+                lei_ok qw(inspect num:1 --dir), "$d/t2";
+                ok(ref(json_utf8->decode($lei_out)), 'inspect num: on v2');
+        });
 }
 
 ok($td->kill, 'killed -httpd');