App-Nag

 view release on metacpan or  search on metacpan

t/arg_validation.t  view on Meta::CPAN

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 
# 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 )