X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F12-env.t;fp=t%2F12-env.t;h=2e3584b8f2a0a68adea3a3fb633f825fd448a516;hb=9e1b933a7cdeed368a062f29cfe995d06416b714;hp=0000000000000000000000000000000000000000;hpb=b47c75970ab200626c92f26eab0f3a4a1123bb6f;p=perl%2Fmodules%2Findirect.git diff --git a/t/12-env.t b/t/12-env.t new file mode 100644 index 0000000..2e3584b --- /dev/null +++ b/t/12-env.t @@ -0,0 +1,19 @@ +#!perl + +use strict; +use warnings; + +use Test::More tests => 3; + +{ + local $ENV{PERL_INDIRECT_PM_DISABLE} = 1; + my $err = 0; + my $res = eval <<' TEST_ENV_VARIABLE'; + return 1; + no indirect hook => sub { ++$err }; + my $x = new Flurbz; + TEST_ENV_VARIABLE + is $@, '', 'PERL_INDIRECT_PM_DISABLE test doesn\'t croak'; + is $res, 1, 'PERL_INDIRECT_PM_DISABLE test returns the correct value'; + is $err, 0, 'PERL_INDIRECT_PM_DISABLE test didn\'t generate any error'; +}