From f67658d41387f486b7a725ece2c5e1015a7c5a84 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 8 Mar 2021 08:08:16 +0000 Subject: lei q: remove angle brackets around Message-IDs They're unnecessary visual noise, and angle brackets don't always work as intended when going through Xapian's query parser. Since we already use "m:" and "refs:" instead of the actual header names, it should be obvious we're at liberty to abbreviate such things Link: https://public-inbox.org/meta/20210304184348.GA19350@dcvr/ --- t/lei-externals.t | 2 +- t/lei-q-thread.t | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 't') diff --git a/t/lei-externals.t b/t/lei-externals.t index 29667640..2a92d101 100644 --- a/t/lei-externals.t +++ b/t/lei-externals.t @@ -25,7 +25,7 @@ SKIP: { lei_ok(@cmd, \"query $url"); is($lei_err, '', "no errors on $url"); my $res = json_utf8->decode($lei_out); - is($res->[0]->{'m'}, "<$mid>", "got expected mid from $url") or + is($res->[0]->{'m'}, $mid, "got expected mid from $url") or skip 'further remote tests', 1; lei_ok(@cmd, 'd:..20101002', \'no results, no error'); is($lei_err, '', 'no output on 404, matching local FS behavior'); diff --git a/t/lei-q-thread.t b/t/lei-q-thread.t index 28c639f5..e24fb2cb 100644 --- a/t/lei-q-thread.t +++ b/t/lei-q-thread.t @@ -27,9 +27,9 @@ test_lei(sub { is(scalar(@$res), 3, 'got 2 results'); pop @$res; my %m = map { $_->{'m'} => $_ } @$res; - is_deeply($m{''}->{kw}, ['seen'], + is_deeply($m{'testmessage@example.com'}->{kw}, ['seen'], 'flag set in direct hit'); - 'TODO' or is_deeply($m{''}->{kw}, ['draft'], + 'TODO' or is_deeply($m{'a-reply@miss'}->{kw}, ['draft'], 'flag set in thread hit'); lei_ok qw(q -t -t m:testmessage@example.com); @@ -37,9 +37,9 @@ test_lei(sub { is(scalar(@$res), 3, 'got 2 results with -t -t'); pop @$res; %m = map { $_->{'m'} => $_ } @$res; - is_deeply($m{''}->{kw}, ['flagged', 'seen'], + is_deeply($m{'testmessage@example.com'}->{kw}, ['flagged', 'seen'], 'flagged set in direct hit'); - 'TODO' or is_deeply($m{''}->{kw}, ['draft'], + 'TODO' or is_deeply($m{'testmessage@example.com'}->{kw}, ['draft'], 'flagged set in direct hit'); lei_ok qw(q -tt m:testmessage@example.com --only), "$ro_home/t2"; $res = json_utf8->decode($lei_out); -- cgit v1.2.3-24-ge0c7