| 1 |
#!/usr/bin/perl -w |
| 2 |
|
| 3 |
BEGIN { |
| 4 |
use lib 't/lib'; |
| 5 |
} |
| 6 |
|
| 7 |
use strict; |
| 8 |
use warnings; |
| 9 |
|
| 10 |
use Test::More tests => 1; |
| 11 |
|
| 12 |
use Dev::Null; |
| 13 |
|
| 14 |
use Test::Harness; |
| 15 |
|
| 16 |
sub _all_ok { |
| 17 |
my ($tot) = shift; |
| 18 |
return $tot->{bad} == 0 |
| 19 |
&& ( $tot->{max} || $tot->{skipped} ) ? 1 : 0; |
| 20 |
} |
| 21 |
|
| 22 |
{ |
| 23 |
local $ENV{PERL_TEST_HARNESS_DUMP_TAP} = 0; |
| 24 |
local $Test::Harness::Verbose = -9; |
| 25 |
|
| 26 |
push @INC, 'examples'; |
| 27 |
|
| 28 |
tie *NULL, 'Dev::Null' or die $!; |
| 29 |
select NULL; |
| 30 |
my ( $tot, $failed ) |
| 31 |
= Test::Harness::execute_tests( tests => ['t/sample-tests/inc_taint'] ); |
| 32 |
select STDOUT; |
| 33 |
|
| 34 |
ok( _all_ok($tot), 'tests with taint on preserve @INC' ); |
| 35 |
} |