diff options
author | Eric Wong <e@80x24.org> | 2023-10-25 15:33:48 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-10-25 20:32:02 +0000 |
commit | 5a5d1fab7f598a707bd254ef0fd934ce9b0e25a7 (patch) | |
tree | 3cd364ed351792b3cb4fcbc5445e6b93e6d80be7 /t | |
parent | 8967111262747ba72fba1141f772514c83dd66f5 (diff) | |
download | public-inbox-5a5d1fab7f598a707bd254ef0fd934ce9b0e25a7.tar.gz |
Most coderepos don't have extensions.objectFormat set, so it's senseless to emit warnings on failures. Fixes: 709fcf00c4d5 (cindex: use run_await to read extensions.objectFormat)
Diffstat (limited to 't')
-rw-r--r-- | t/cindex.t | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -13,6 +13,7 @@ my ($tmp, $for_destroy) = tmpdir(); my $pwd = getcwd(); my @unused_keys = qw(last_commit has_threadid skip_docdata); local $ENV{PI_CONFIG} = '/dev/null'; +my $opt = { 1 => \(my $cidx_out), 2 => \(my $cidx_err) }; # I reworked CodeSearchIdx->shard_worker to handle empty trees # in the initial commit generated by cvs2svn for xapian.git @@ -166,7 +167,9 @@ SKIP: { # --prune is(scalar($csrch->mset('s:hi')->items), 1, 'got hit'); rename("$tmp/wt0/.git", "$tmp/wt0/.giit"); - ok(run_script([qw(-cindex -q --prune -d), "$tmp/ext"]), 'prune'); + ok(run_script([qw(-cindex -q --prune -d), "$tmp/ext"], undef, $opt), + 'prune'); + is(${$opt->{2}}, '', 'nothing in stderr') or diag explain($opt); $csrch->reopen; is(scalar($csrch->mset('s:hi')->items), 0, 'hit pruned'); @@ -213,7 +216,7 @@ EOM close $fh; my $cmd = [ qw(-cindex -u --all --associate -d), "$tmp/ext", '-I', $basic->{inboxdir} ]; - my $opt = { 1 => \(my $cidx_out), 2 => \(my $cidx_err) }; + $cidx_out = $cidx_err = ''; ok(run_script($cmd, $env, $opt), 'associate w/o search'); like($cidx_err, qr/W: \Q$basic->{inboxdir}\E not indexed for search/, 'non-Xapian-enabled inbox noted'); |