This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update the Change log in Module::CoreList to include recent commits
[perl5.git] / cpan / autodie / t / hints_insist.t
1 #!/usr/bin/perl -w
2 use strict;
3 use warnings;
4 use autodie;
5
6 use Test::More tests => 5;
7
8 use FindBin qw($Bin);
9 use lib "$Bin/lib";
10
11 use Hints_provider_does qw(always_pass always_fail no_hints);
12
13 eval "use autodie qw( ! always_pass always_fail); ";
14 is("$@", "", "Insisting on good hints (distributed insist)");
15
16 is(always_pass(), "foo", "Always_pass() should still work");
17 is(always_fail(), "foo", "Always_pass() should still work");
18
19 eval "use autodie qw(!always_pass !always_fail); ";
20 is("$@", "", "Insisting on good hints (individual insist)");
21
22 my $ret = eval "use autodie qw(!no_hints); 1;";
23 isnt("$@", "", "Asking for non-existent hints");