From 502297d2cda95376b38e7d510f1d34fe89a3ec0e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 2 Oct 2021 08:16:22 +0000 Subject: lei inspect: fix "mid:" prefix, expand to Xapian This fixes inspect for uninitialized instances, and adds Xapian ("xdoc") output if available. Reported-by: Konstantin Ryabitsev Message-ID: <20211001204943.l4yl6xvc45c5eapz@meerkat.local> --- t/lei-inspect.t | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 t/lei-inspect.t (limited to 't') diff --git a/t/lei-inspect.t b/t/lei-inspect.t new file mode 100644 index 00000000..077d0d13 --- /dev/null +++ b/t/lei-inspect.t @@ -0,0 +1,14 @@ +#!perl -w +# Copyright all contributors +# License: AGPL-3.0+ +use strict; use v5.10.1; use PublicInbox::TestCommon; + +test_lei(sub { + my ($ro_home, $cfg_path) = setup_public_inboxes; + lei_ok qw(inspect --dir), "$ro_home/t1", 'mid:testmessage@example.com'; + my $ent = json_utf8->decode($lei_out); + is(ref($ent->{smsg}), 'ARRAY', 'smsg array'); + is(ref($ent->{xdoc}), 'ARRAY', 'xdoc array'); +}); + +done_testing; -- cgit v1.2.3-24-ge0c7