X-Git-Url: http://git.maemo.org/git/?p=dh-make-perl;a=blobdiff_plain;f=dev%2Farm%2Flibtest-harness-perl%2Flibtest-harness-perl-3.12%2Ft%2Fcompat%2Finc_taint.t;fp=dev%2Farm%2Flibtest-harness-perl%2Flibtest-harness-perl-3.12%2Ft%2Fcompat%2Finc_taint.t;h=06a8e237bd8d5e70d84e1779b8e72172d7008c60;hp=0000000000000000000000000000000000000000;hb=f477fa73365d491991707e7ed9217b48d6994551;hpb=da95c414033799c3a62606f299c3c00b5c77ca11 diff --git a/dev/arm/libtest-harness-perl/libtest-harness-perl-3.12/t/compat/inc_taint.t b/dev/arm/libtest-harness-perl/libtest-harness-perl-3.12/t/compat/inc_taint.t new file mode 100644 index 0000000..06a8e23 --- /dev/null +++ b/dev/arm/libtest-harness-perl/libtest-harness-perl-3.12/t/compat/inc_taint.t @@ -0,0 +1,45 @@ +#!/usr/bin/perl -w + +BEGIN { + if ( $ENV{PERL_CORE} ) { + chdir 't'; + @INC = ( '../lib', 'lib' ); + } + else { + use lib 't/lib'; + } +} + +use strict; + +use Test::More tests => 1; + +use Dev::Null; + +use Test::Harness; + +sub _all_ok { + my ($tot) = shift; + return $tot->{bad} == 0 + && ( $tot->{max} || $tot->{skipped} ) ? 1 : 0; +} + +{ + local $ENV{PERL_TEST_HARNESS_DUMP_TAP} = 0; + local $Test::Harness::Verbose = -9; + + push @INC, 'examples'; + + tie *NULL, 'Dev::Null' or die $!; + select NULL; + my ( $tot, $failed ) = Test::Harness::execute_tests( + tests => [ + $ENV{PERL_CORE} + ? 'lib/sample-tests/inc_taint' + : 't/sample-tests/inc_taint' + ] + ); + select STDOUT; + + ok( _all_ok($tot), 'tests with taint on preserve @INC' ); +}