]> Sergey Matveev's repositories - public-inbox.git/blob - t/lei-lcat.t
lei lcat: extract Message-IDs from URLs and show them
[public-inbox.git] / t / lei-lcat.t
1 #!perl -w
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;
5 require_mods(qw(lei));
6
7 test_lei(sub {
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');
14 });
15
16 done_testing;