From 66b5829892cf0fcd5249e26be21d8b3f3ee35816 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 30 May 2021 06:33:58 +0000 Subject: lei: support implicit stdin by default This adds implicit stdin suppport for p2q and lcat, while rm and rediff no longer need explicit support for it. --- t/lei-p2q.t | 4 ++++ 1 file changed, 4 insertions(+) (limited to 't') diff --git a/t/lei-p2q.t b/t/lei-p2q.t index f8b073cf..58506f94 100644 --- a/t/lei-p2q.t +++ b/t/lei-p2q.t @@ -14,6 +14,10 @@ test_lei(sub { lei_ok([qw(p2q -w dfpost -)], undef, { %$lei_opt, 0 => $fh }); is($lei_out, "dfpost:6e006fd73b1d\n", '--stdin') or diag $lei_err; + sysseek($fh, 0, 0) or xbail "lseek: $!"; + lei_ok([qw(p2q -w dfpost)], undef, { %$lei_opt, 0 => $fh }); + is($lei_out, "dfpost:6e006fd73b1d\n", 'implicit --stdin'); + lei_ok(qw(p2q --uri t/data/0001.patch -w), 'dfpost,dfn'); is($lei_out, "dfpost%3A6e006fd73b1d+". "dfn%3Alib%2FPublicInbox%2FSearch.pm\n", -- cgit v1.2.3-24-ge0c7