]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/lei.t
lei q: honor --no-local to force remote searches
[public-inbox.git] / t / lei.t
diff --git a/t/lei.t b/t/lei.t
index 60ca75c5da8084be83078b5679ac6176d3e0ed3f..3fd1d1fe5c1d3acc2ad1b1e104c3100888bbf5e6 100644 (file)
--- a/t/lei.t
+++ b/t/lei.t
@@ -277,6 +277,9 @@ my $test_external = sub {
        }
        ok(!$lei->('q', '-o', "$home/mbox", 's:nope'),
                        'fails if mbox format unspecified');
+       ok(!$lei->(qw(q --no-local s:see)), '--no-local');
+       is($? >> 8, 1, 'proper exit code');
+       like($err, qr/no local or remote.+? to search/, 'no inbox');
        my %e = (
                TEST_LEI_EXTERNAL_HTTPS => 'https://public-inbox.org/meta/',
                TEST_LEI_EXTERNAL_ONION => $onions[int(rand(scalar(@onions)))],