Test2-Suite

 view release on metacpan or  search on metacpan

lib/Test2/V0.pm  view on Meta::CPAN

    if ( !$no_srand ) {
        Test2::Plugin::SRand->import($srand ? $srand : ()) if defined($srand) || !$SRAND++;
    }

    # Pragmas
    my $no_pragmas  = delete $options{'-no_pragmas'};
    my $no_strict   = delete $options{'-no_strict'} || $no_pragmas;
    my $no_warnings = delete $options{'-no_warnings'} || $no_pragmas;
    my $no_utf8     = delete $options{'-no_utf8'} || $no_pragmas;

    strict->import()              unless $no_strict;
    'warnings'->import()          unless $no_warnings;
    Test2::Plugin::UTF8->import() unless $no_utf8;

    my $target = delete $options{'-target'};
    Test2::Tools::Target->import_into($caller, $target)
        if $target;

    croak "Unknown option(s): " . join(', ', sort keys %options) if keys %options;

    Test2::Util::Importer->import_into($class, $caller, @exports);

t/modules/Bundle/Extended.t  view on Meta::CPAN


ok(Test2::Plugin::ExitSummary->active, "Exit Summary is loaded");
ok(defined(Test2::Plugin::SRand->seed), "SRand is loaded");

subtest strictures => sub {
    local $^H;
    my $hbefore = $^H;
    Test2::Bundle::Extended->import;
    my $hafter = $^H;

    my $strict = do { local $^H; strict->import(); $^H };

    ok($strict,               'sanity, got $^H value for strict');
    ok(!($hbefore & $strict), "strict is not on before loading Test2::Bundle::Extended");
    ok(($hafter & $strict),   "strict is on after loading Test2::Bundle::Extended");
};

subtest warnings => sub {
    local ${^WARNING_BITS};
    my $wbefore = ${^WARNING_BITS} || '';
    Test2::Bundle::Extended->import;

t/modules/V0.t  view on Meta::CPAN


ok(Test2::Plugin::ExitSummary->active, "Exit Summary is loaded");
ok(defined(Test2::Plugin::SRand->seed), "SRand is loaded");

subtest strictures => sub {
    local $^H;
    my $hbefore = $^H;
    Test2::V0->import;
    my $hafter = $^H;

    my $strict = do { local $^H; strict->import(); $^H };

    ok($strict,               'sanity, got $^H value for strict');
    ok(!($hbefore & $strict), "strict is not on before loading Test2::V0");
    ok(($hafter & $strict),   "strict is on after loading Test2::V0");
};

subtest warnings => sub {
    local ${^WARNING_BITS};
    my $wbefore = ${^WARNING_BITS} || '';
    Test2::V0->import;



( run in 0.319 second using v1.01-cache-2.11-cpan-299005ec8e3 )