'reindex' => [ '', 'reindex all locally-indexed messages', @c_opt ],
-'index' => [ 'LOCATION...', 'one-time index from URL or filesystem',
+'index' => [ 'LOCATION... [LABELS...]', 'one-time index from URL or filesystem',
qw(in-format|F=s kw! offset=i recursive|r exclude=s include|I=s
verbose|v+ incremental!), @net_opt, # mainly for --proxy=
@c_opt ],
test_lei({ tmpdir => $tmpdir }, sub {
my $store_path = "$ENV{HOME}/.local/share/lei/store/";
- lei_ok('index', "$tmpdir/md");
+ lei_ok qw(index +L:md), "$tmpdir/md";
lei_ok(qw(q mid:qp@example.com));
my $res_a = json_utf8->decode($lei_out);
+ is_deeply $res_a->[0]->{L}, [ 'md' ], 'label set on index';
my $blob = $res_a->[0]->{'blob'};
like($blob, qr/\A[0-9a-f]{40,}\z/, 'got blob from qp@example');
lei_ok(qw(-C / blob), $blob);