Getopt-Long-Complete

 view release on metacpan or  search on metacpan

t/01-basic.t  view on Meta::CPAN


use strict;
use warnings;
use Test::More 0.98;

use Getopt::Long::Complete;

is($REQUIRE_ORDER, 0);

subtest GetOptions => sub {
    local @ARGV = ("--foo", "--bar", "baz");
    my %opts;
    GetOptions(
        'foo' => \$opts{foo},
        'bar=s' => sub { $opts{bar} = $_[1] },
    );
    ok($opts{foo});
    is($opts{bar}, "baz");
};

DONE_TESTING:

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.456 second using v1.00-cache-2.02-grep-82fe00e-cpan-da92000dfeb )