X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Flei-index.t;h=c31b1c3cfa8c24e16751a9f108c3fe5d730e07f6;hb=4ac15319847bc91ab2b7e8bb4b9f8955ba9fd55c;hp=aab8f7e63f0609bc85ccdf73794931716e52f572;hpb=ede63a345dfa0254e319650baafc7d341ef7a925;p=public-inbox.git diff --git a/t/lei-index.t b/t/lei-index.t index aab8f7e6..c31b1c3c 100644 --- a/t/lei-index.t +++ b/t/lei-index.t @@ -1,5 +1,5 @@ #!perl -w -# Copyright (C) 2021 all contributors +# Copyright (C) all contributors # License: AGPL-3.0+ use strict; use v5.10.1; use PublicInbox::TestCommon; use File::Spec; @@ -85,6 +85,10 @@ test_lei({ tmpdir => $tmpdir }, sub { lei_ok qw(q m:multipart-html-sucks@11); is_deeply(json_utf8->decode($lei_out)->[0]->{'kw'}, ['seen'], 'keyword set'); + lei_ok 'reindex'; + lei_ok qw(q m:multipart-html-sucks@11); + is_deeply(json_utf8->decode($lei_out)->[0]->{'kw'}, + ['seen'], 'keyword still set after reindex'); $srv->{nntpd} and lei_ok('index', "nntp://$srv->{nntp_host_port}/t.v2"); @@ -104,6 +108,12 @@ test_lei({ tmpdir => $tmpdir }, sub { my $t = xqx(['git', "--git-dir=$store_path/ALL.git", qw(cat-file -t), $res_b->{blob}]); is($t, "blob\n", 'got blob'); + + lei_ok('reindex'); + lei_ok qw(q m:multipart-html-sucks@11); + $res_a = json_utf8->decode($lei_out)->[0]; + is_deeply($res_a->{'kw'}, ['seen'], + 'keywords still set after reindex'); }); done_testing;