App-Nag
view release on metacpan or search on metacpan
t/arg_validation.t view on Meta::CPAN
7891011121314151617181920212223242526use
Test::More;
use
Test::Fatal;
# this all could be cleaned up a bit
my
(
$opt
,
$usage
,
$name
,
$verbosity
,
$text
,
$synopsis
,
$seconds
,
$time
,
$true_seconds
);
local
@ARGV
;
subtest
'1s delta'
=>
sub
{
@ARGV
=
qw(1s this is the text)
;
(
$opt
,
$usage
,
$name
) = App::Nag->validate_args;
(
$verbosity
,
$text
,
$synopsis
,
$seconds
) =
App::Nag->validate_time(
$opt
,
$usage
,
@ARGV
);
ok(
$verbosity
== 1,
'right verbosity'
);
ok(
$seconds
== 1,
'1s'
);
};
( run in 0.546 second using v1.01-cache-2.11-cpan-49f99fa48dc )