summaryrefslogtreecommitdiff
path: root/t/cli.t
diff options
context:
space:
mode:
Diffstat (limited to 't/cli.t')
-rwxr-xr-x[-rw-r--r--]t/cli.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/cli.t b/t/cli.t
index 0fc0528..010fc79 100644..100755
--- a/t/cli.t
+++ b/t/cli.t
@@ -8,7 +8,7 @@ use strict;
use warnings;
use File::Basename;
-use Test::More tests => 1;
+use Test::More tests => 3;
use testutil;
@@ -47,4 +47,8 @@ my $STOW = 'bin/stow';
`$STOW --help`;
is($?, 0, "--help should return 0 exit code");
+my $err = `$STOW --foo 2>&1`;
+is($? >> 8, 1, "unrecognised option should return 1 exit code");
+like($err, qr/^Unknown option: foo$/m, "unrecognised option should be listed");
+
# vim:ft=perl