about summary refs log tree commit homepage
path: root/t/lei.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-09-15 22:47:00 +0000
committerEric Wong <e@80x24.org>2023-09-16 12:12:47 +0000
commit584d2d5fc4fb458792aef93c9802126d0722dfb1 (patch)
tree661c363861db2b7eb219d580276620435cf6500f /t/lei.t
parent4dcb50319432011d13f8134d37db0a395bfedc68 (diff)
downloadpublic-inbox-584d2d5fc4fb458792aef93c9802126d0722dfb1.tar.gz
Xapian can't parse every query, so ensure we set the
exit code for the client.
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 d83bde69..1199ca75 100644
--- a/t/lei.t
+++ b/t/lei.t
@@ -147,6 +147,11 @@ my $test_fail = sub {
         lei_ok('q', "foo\n");
         like($lei_err, qr/trailing `\\n' removed/s, "noted `\\n' removal");
 
+        lei(qw(q from:infinity..));
+        is($? >> 8, 22, 'combined query fails on invalid range op');
+        lei(qw(q -t from:infinity..));
+        is($? >> 8, 22, 'single query fails on invalid range op');
+
         for my $lk (qw(ei inbox)) {
                 my $d = "$home/newline\n$lk";
                 my $all = $lk eq 'ei' ? 'ALL' : 'all';