From: Eric Wong Date: Thu, 23 Jul 2026 05:50:53 +0000 (+0000) Subject: t/lei-index: ignore {pct} in m: vs mid: queries X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;p=thirdparty%2Fpublic-inbox.git t/lei-index: ignore {pct} in m: vs mid: queries Xapian 2.0.0 appears to score m: (probabilistic) and mid: (boolean) matches differently than the 1.4.x series. This seems to make sense since boolean matches score higher (as expected), so adjust our case to stop caring about the result of ->get_percent between different queries. This behavior was confirmed with Xapian 2.0 on both Debian sid/rc-buggy and FreeBSD 15. --- diff --git a/t/lei-index.t b/t/lei-index.t index 2b28f1be5..3111926db 100644 --- a/t/lei-index.t +++ b/t/lei-index.t @@ -70,7 +70,8 @@ test_lei({ tmpdir => $tmpdir }, sub { 'imported blob'); lei_ok(qw(q m:qp@example.com --dedupe=none)); my $res_b = json_utf8->decode($lei_out); - is_deeply($res_b, $res_a, 'no extra DB entries'); + delete $_->[0]->{pct} for ($res_a, $res_b); + is_xdeeply $res_b, $res_a, 'no extra DB entries'; # ensure tag works on index-only messages: lei_ok(qw(tag +kw:seen t/utf8.eml));