diff options
Diffstat (limited to 't/cli.t')
-rwxr-xr-x[-rw-r--r--] | t/cli.t | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |