about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-11-27 09:52:48 +0000
committerEric Wong <e@80x24.org>2020-11-28 04:53:17 +0000
commit721f7add0cf5ac6e6247483628e985742c09e45f (patch)
treea72f9029fc1e04ac27350c9a69397f73ac3c011d /t
parentb700fce60f25038ecd32551027e44b9b4b3ac544 (diff)
downloadpublic-inbox-721f7add0cf5ac6e6247483628e985742c09e45f.tar.gz
miscsearch: implement ->newsgroup_matches
This may be used to speed up newsgroup searches down-the-line,
but the grep perlop isn't too shabby, at the moment.
Diffstat (limited to 't')
-rw-r--r--t/extsearch.t4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/extsearch.t b/t/extsearch.t
index 0045294b..85cdf74a 100644
--- a/t/extsearch.t
+++ b/t/extsearch.t
@@ -79,5 +79,9 @@ my @it = $misc->mset('')->items;
 is(scalar(@it), 2, 'two inboxes');
 like($it[0]->get_document->get_data, qr/v2test/, 'docdata matched v2');
 like($it[1]->get_document->get_data, qr/v1test/, 'docdata matched v1');
+my $pi_cfg = PublicInbox::Config->new;
+$pi_cfg->fill_all;
+my $ret = $misc->newsgroup_matches('', $pi_cfg);
+is_deeply($pi_cfg->{-by_newsgroup}, $ret, '->newsgroup_matches');
 
 done_testing;