Test-Group-Foreach

 view release on metacpan or  search on metacpan

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

use strict;
use warnings;

use Test::More tests => 17;
use Test::Exception;

BEGIN { use_ok 'Test::Group::Foreach' }

sub e ($) {
    my $code = shift;
    eval $code;
    die $@ if $@;
}

lives_ok {e 'next_test_foreach(my $p, "p", 1)'       } "1 val pass";
lives_ok {e 'next_test_foreach(my $p, "p", 1, 2)'    } "2 vals pass";
lives_ok {e 'next_test_foreach(my $p, "p", 1, 2, 3)' } "3 vals pass";

dies_ok {e 'next_test_foreach()'          } "no args fail";



( run in 0.956 second using v1.01-cache-2.11-cpan-524268b4103 )