about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-01-19 09:34:34 +0000
committerEric Wong <e@80x24.org>2021-01-21 03:29:13 +0000
commit934b7431d93e6e49920e407c02653edad06987d6 (patch)
tree5792adf8d6bc812c1b66fa84d88994d466a8bfe4 /t
parent90e3d8101429793b80ac75d4f87ec058f77e5b1d (diff)
downloadpublic-inbox-934b7431d93e6e49920e407c02653edad06987d6.tar.gz
Because user errors happen...
Diffstat (limited to 't')
-rw-r--r--t/lei.t14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/lei.t b/t/lei.t
index c804ff59..8bb4e439 100644
--- a/t/lei.t
+++ b/t/lei.t
@@ -181,6 +181,20 @@ my $test_external = sub {
         $lei->('ls-external');
         like($out, qr/boost=0\n/s, 'ls-external has output');
 
+        ok(!$lei->(qw(q s:prefix -o /dev/null -f maildir)), 'bad maildir');
+        like($err, qr!/dev/null exists and is not a directory!,
+                'error shown');
+        is($? >> 8, 1, 'errored out with exit 1');
+
+        ok(!$lei->(qw(q s:prefix -f mboxcl2 -o), $home), 'bad mbox');
+        like($err, qr!\Q$home\E exists and is not a regular file!,
+                'error shown');
+        is($? >> 8, 1, 'errored out with exit 1');
+
+        ok(!$lei->(qw(q s:prefix -o /dev/stdout -f Mbox2)), 'bad format');
+        like($err, qr/bad mbox --format=mbox2/, 'error shown');
+        is($? >> 8, 1, 'errored out with exit 1');
+
         # note, on a Bourne shell users should be able to use either:
         #        s:"use boolean prefix"
         #        "s:use boolean prefix"