App-Nag
view release on metacpan or search on metacpan
t/arg_validation.t view on Meta::CPAN
use 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.980 second using v1.01-cache-2.11-cpan-49f99fa48dc )