]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/extsearch.t
nntp: make ->ALL Xref generation more fuzzy
[public-inbox.git] / t / extsearch.t
index 10b14baf19f1cfac16c5cb2aa444ab74657db878..2b8b88ea2697ff104e0a8495d480545caad2c5fb 100644 (file)
@@ -53,7 +53,10 @@ run_script(['-mda', '--no-precheck'], $env, { 0 => $fh }) or BAIL_OUT '-mda';
 run_script(['-index', "$home/v1test"]) or BAIL_OUT "index $?";
 
 ok(run_script([qw(-extindex --all), "$home/extindex"]), 'extindex init');
-
+{
+       my $es = PublicInbox::ExtSearch->new("$home/extindex");
+       ok($es->has_threadid, '->has_threadid');
+}
 
 { # TODO: -extindex should write this to config
        open $fh, '>>', $cfg_path or BAIL_OUT $!;
@@ -69,7 +72,8 @@ EOF
        ok($pi_cfg->ALL, '->ALL');
        my $ibx = $pi_cfg->{-by_newsgroup}->{'v2.example'};
        my $ret = $pi_cfg->ALL->nntp_xref_for($ibx, $ibx->over->get_art(1));
-       is_deeply($ret, ['v1.example:1'], '->nntp_xref_for');
+       is_deeply($ret, { 'v1.example' => 1, 'v2.example' => 1 },
+               '->nntp_xref_for');
 }
 
 SKIP: {