diff options
author | Eric Wong <e@80x24.org> | 2021-01-19 09:34:34 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-01-21 03:29:13 +0000 |
commit | 934b7431d93e6e49920e407c02653edad06987d6 (patch) | |
tree | 5792adf8d6bc812c1b66fa84d88994d466a8bfe4 /t | |
parent | 90e3d8101429793b80ac75d4f87ec058f77e5b1d (diff) | |
download | public-inbox-934b7431d93e6e49920e407c02653edad06987d6.tar.gz |
Because user errors happen...
Diffstat (limited to 't')
-rw-r--r-- | t/lei.t | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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" |