Skip to content

Commit

Permalink
Test short options.
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Apr 13, 2012
1 parent d719a98 commit b6a89a7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion t/options.t
Expand Up @@ -3,7 +3,7 @@
use strict;
use warnings;
use utf8;
use Test::More tests => 19;
use Test::More tests => 20;
#use Test::More 'no_plan';
use Test::MockModule;
use Capture::Tiny ':all';
Expand Down Expand Up @@ -135,6 +135,17 @@ is_deeply $CLASS->_parse_core_opts([
quiet => 1,
}, 'Should parse lots of options';

##############################################################################
# Try short options.
is_deeply $CLASS->_parse_core_opts([
'-d' => 'mydb',
'-u' => 'fred',
]), {
%opts,
db_name => 'mydb',
username => 'fred',
}, 'Short options should work';

USAGE: {
my $mock = Test::MockModule->new('Pod::Usage');
my @args;
Expand Down

0 comments on commit b6a89a7

Please sign in to comment.