about summary refs log tree commit homepage
path: root/t/lei.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-10-17 10:11:04 +0000
committerEric Wong <e@80x24.org>2023-10-17 20:30:05 +0000
commitcb1c4976f116ebdf94300fd474c7176e82122003 (patch)
tree405e044a4d2397acd24aedfd6f0d28bd51124a72 /t/lei.t
parente740838a3854a45e51d8ae089a90f08c076190bd (diff)
downloadpublic-inbox-cb1c4976f116ebdf94300fd474c7176e82122003.tar.gz
We can share more code amongst stdin slurper (not streaming)
commands.  This also fixes uninitialized variable warnings when
feeding an empty stdin to these commands.
Diffstat (limited to 't/lei.t')
-rw-r--r--t/lei.t5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/lei.t b/t/lei.t
index 3ac804a8..1dbc9d4c 100644
--- a/t/lei.t
+++ b/t/lei.t
@@ -182,6 +182,11 @@ my $test_fail = sub {
         }
         lei_ok('sucks', \'yes, but hopefully less every day');
         like($lei_out, qr/loaded features/, 'loaded features shown');
+
+        lei_ok([qw(q --stdin -f text)], undef, { 0 => \'', %$lei_opt });
+        is($lei_err, '', 'no errors on empty stdin');
+        is($lei_out, '', 'no output on empty query');
+
 SKIP: {
         skip 'no curl', 3 unless require_cmd('curl', 1);
         lei(qw(q --only http://127.0.0.1:99999/bogus/ t:m));