Test-Warnings

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

      "develop" : {
         "recommends" : {
            "Dist::Zilla::PluginBundle::Author::ETHER" : "0.165",
            "Dist::Zilla::PluginBundle::Git::VersionManager" : "0.007"
         },
         "requires" : {
            "Encode" : "0",
            "File::Spec" : "0",
            "IO::Handle" : "0",
            "IPC::Open3" : "0",
            "PadWalker" : "0",
            "Pod::Coverage::TrustPod" : "0",
            "Pod::Wordlist" : "0",
            "Test::CPAN::Changes" : "0.19",
            "Test::CPAN::Meta" : "0",
            "Test::Deep" : "0",
            "Test::EOL" : "0",
            "Test::Kwalitee" : "1.21",
            "Test::MinimumVersion" : "0",
            "Test::Mojibake" : "0",
            "Test::More" : "0.96",

META.json  view on Meta::CPAN

            "ExtUtils::MakeMaker" : "0",
            "File::Spec" : "0",
            "Term::ANSIColor" : "0",
            "Test::More" : "0.94",
            "if" : "0",
            "perl" : "5.006"
         },
         "suggests" : {
            "CPAN::Meta::Check" : "0.011",
            "CPAN::Meta::Requirements" : "0",
            "PadWalker" : "0",
            "Test::Tester" : "0.108"
         }
      },
      "x_Dist_Zilla" : {
         "requires" : {
            "Dist::Zilla" : "5",
            "Dist::Zilla::Plugin::Authority" : "1.009",
            "Dist::Zilla::Plugin::AutoMetaResources" : "0",
            "Dist::Zilla::Plugin::AutoPrereqs" : "5.038",
            "Dist::Zilla::Plugin::Breaks" : "0",

META.json  view on Meta::CPAN

         },
         {
            "class" : "Dist::Zilla::Plugin::Prereqs::Soften",
            "config" : {
               "Dist::Zilla::Plugin::Prereqs::Soften" : {
                  "copy_to" : [
                     "develop.requires"
                  ],
                  "modules" : [
                     "Test::Tester",
                     "PadWalker"
                  ],
                  "modules_from_features" : null,
                  "to_relationship" : "suggests"
               }
            },
            "name" : "Prereqs::Soften",
            "version" : "0.006003"
         },
         {
            "class" : "Dist::Zilla::Plugin::MetaResources",

META.yml  view on Meta::CPAN

      name: OnlyCorePrereqs
      version: '0.025'
    -
      class: Dist::Zilla::Plugin::Prereqs::Soften
      config:
        Dist::Zilla::Plugin::Prereqs::Soften:
          copy_to:
            - develop.requires
          modules:
            - Test::Tester
            - PadWalker
          modules_from_features: ~
          to_relationship: suggests
      name: Prereqs::Soften
      version: '0.006003'
    -
      class: Dist::Zilla::Plugin::MetaResources
      name: MetaResources
      version: '6.032'
    -
      class: Dist::Zilla::Plugin::Breaks

dist.ini  view on Meta::CPAN

-remove = Test::UnusedVars
-remove = Test::CleanNamespaces

[OnlyCorePrereqs]
:version = 0.013
starting_version = 5.006    ; warnings
check_dual_life_versions = 0

[Prereqs::Soften]
module = Test::Tester
module = PadWalker
copy_to = develop.requires
to_relationship = suggests

[MetaResources]
x_IRC = irc://irc.perl.org/#perl-qa
x_MailingList = http://lists.perl.org/list/perl-qa.html

[Breaks]
File::pushd = < 1.004

t/00-report-prereqs.dd  view on Meta::CPAN

       'develop' => {
                      'recommends' => {
                                        'Dist::Zilla::PluginBundle::Author::ETHER' => '0.165',
                                        'Dist::Zilla::PluginBundle::Git::VersionManager' => '0.007'
                                      },
                      'requires' => {
                                      'Encode' => '0',
                                      'File::Spec' => '0',
                                      'IO::Handle' => '0',
                                      'IPC::Open3' => '0',
                                      'PadWalker' => '0',
                                      'Pod::Coverage::TrustPod' => '0',
                                      'Pod::Wordlist' => '0',
                                      'Test::CPAN::Changes' => '0.19',
                                      'Test::CPAN::Meta' => '0',
                                      'Test::Deep' => '0',
                                      'Test::EOL' => '0',
                                      'Test::Kwalitee' => '1.21',
                                      'Test::MinimumVersion' => '0',
                                      'Test::Mojibake' => '0',
                                      'Test::More' => '0.96',

t/00-report-prereqs.dd  view on Meta::CPAN

                                   'ExtUtils::MakeMaker' => '0',
                                   'File::Spec' => '0',
                                   'Term::ANSIColor' => '0',
                                   'Test::More' => '0.94',
                                   'if' => '0',
                                   'perl' => '5.006'
                                 },
                   'suggests' => {
                                   'CPAN::Meta::Check' => '0.011',
                                   'CPAN::Meta::Requirements' => '0',
                                   'PadWalker' => '0',
                                   'Test::Tester' => '0.108'
                                 }
                 },
       'x_Dist_Zilla' => {
                           'requires' => {
                                           'Dist::Zilla' => '5',
                                           'Dist::Zilla::Plugin::Authority' => '1.009',
                                           'Dist::Zilla::Plugin::AutoMetaResources' => '0',
                                           'Dist::Zilla::Plugin::AutoPrereqs' => '5.038',
                                           'Dist::Zilla::Plugin::Breaks' => '0',

t/13-propagate-warnings.t  view on Meta::CPAN

    &&
is(
    $warnings[0],
    "hello this is a warning at $file line $line.\n",
    '..and it is the warning we just issued, with original location intact',
)
    ||
diag 'warnings propagated to original handler: ', explain \@warnings;

SKIP: {
    skip 'PadWalker required for this test', 1
        if not eval { require PadWalker; 1 };
    is(
        ${ PadWalker::closed_over(\&Test::Warnings::had_no_warnings)->{'$forbidden_warnings_found'} },
        1,
        'Test::Warnings also saw the warning go by',
    );
}

done_testing;

t/14-propagate-subname.t  view on Meta::CPAN

    &&
is(
    $warnings[0],
    "hello this is a warning at $file line $line.\n",
    '..and it is the warning we just issued, with original location intact',
)
    ||
diag 'warnings propagated to original handler: ', explain \@warnings;

SKIP: {
    skip 'PadWalker required for this test', 1
        if not eval { require PadWalker; 1 };
    is(
        ${ PadWalker::closed_over(\&Test::Warnings::had_no_warnings)->{'$forbidden_warnings_found'} },
        1,
        'Test::Warnings also saw the warning go by',
    );
}

done_testing;

t/15-propagate-default.t  view on Meta::CPAN

    $SIG{__WARN__} = 'DEFAULT';
}

use Test::Warnings qw(:all :no_end_test);
use if "$]" >= '5.008', lib => 't/lib';
use if "$]" >= '5.008', 'SilenceStderr';

warn 'this warning is not expected to be caught';

SKIP: {
    skip 'PadWalker required for this test', 1
        if not eval { require PadWalker; 1 };
    is(
        ${ PadWalker::closed_over(\&Test::Warnings::had_no_warnings)->{'$forbidden_warnings_found'} },
        1,
        'Test::Warnings saw the warning, and allowed it to go by',
    );
}

done_testing;

t/16-propagate-ignore.t  view on Meta::CPAN

    $SIG{__WARN__} = 'IGNORE';
}

use Test::Warnings qw(:all :no_end_test);
use if "$]" >= '5.008', lib => 't/lib';
use if "$]" >= '5.008', 'SilenceStderr';

warn 'this warning is not expected to be caught';

SKIP: {
    skip 'PadWalker required for this test', 1
        if not eval { require PadWalker; 1 };
    is(
        ${ PadWalker::closed_over(\&Test::Warnings::had_no_warnings)->{'$forbidden_warnings_found'} },
        1,
        'Test::Warnings saw the warning, and allowed it to go by',
    );
}

done_testing;

t/19-propagate-nonexistent-subname.t  view on Meta::CPAN

}

use Test::Warnings qw(:all :no_end_test);
use if "$]" >= '5.008', lib => 't/lib';
use if "$]" >= '5.008', 'SilenceStderr';

eval { warn 'this warning is not expected to be caught' };
is($@, '', 'non-existent sub in warning handler does not result in an exception');

SKIP: {
    skip 'PadWalker required for this test', 1
        if not eval { require PadWalker; 1 };
    is(
        ${ PadWalker::closed_over(\&Test::Warnings::had_no_warnings)->{'$forbidden_warnings_found'} },
        1,
        'Test::Warnings saw the warning go by',
    );
}

done_testing;



( run in 0.735 second using v1.01-cache-2.11-cpan-05444aca049 )