2 # Copyright (C) 2021 all contributors <meta@public-inbox.org>
3 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
4 use strict; use v5.10.1; use PublicInbox::TestCommon;
8 my $in = "\nMessage-id: <qp\@example.com>\n";
9 lei_ok([qw(lcat --stdin)], undef, { 0 => \$in, %$lei_opt });
10 unlike($lei_out, qr/\S/, 'nothing, yet');
11 lei_ok('import', 't/plack-qp.eml');
12 lei_ok([qw(lcat --stdin)], undef, { 0 => \$in, %$lei_opt });
13 like($lei_out, qr/qp\@example\.com/, 'got a result');
15 # test Link:, -f reply, and implicit --stdin:
17 $in = "\nLink: https://example.com/foo/qp\@example.com/\n";
18 lei_ok([qw(lcat -f reply)], undef, { 0 => \$in, %$lei_opt});
22 In-Reply-To: <qp@example.com>
24 On some unknown date, qp wrote:
27 like($lei_out, qr/\AFrom [^\n]+\n\Q$exp\E/sm, '-f reply works');