Skip to content

Commit

Permalink
Added test for processing unknown type
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanwills-optus committed Jul 23, 2017
1 parent 32b413b commit 975c713
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions t/options.t
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,10 @@ sub option_process {

($value, $used) = $three->process('', 'T', 'test', []);
is $value, 'test', '--short again sets value to test';

$three->{type} = 'Other';
eval { $three->process('', 'T', 'O', []) };
$error = $@;
ok $error, 'Get an error';
like $error, qr/^Unknown type 'Other'\n/, 'Error on unknown types';
}

0 comments on commit 975c713

Please sign in to comment.