This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Convert all File::Glob tests to Test::More.
[perl5.git] / ext / File-Glob / t / taint.t
1 #!./perl -T
2
3 BEGIN {
4     chdir 't' if -d 't';
5     @INC = '../lib';
6     require Config; import Config;
7     if ($Config{'extensions'} !~ /\bFile\/Glob\b/i) {
8         print "1..0\n";
9         exit 0;
10     }
11 }
12
13 use Test::More tests => 2;
14
15 BEGIN {
16     use_ok('File::Glob');
17 }
18
19 @a = File::Glob::bsd_glob("*");
20 eval { $a = join("",@a), kill 0; 1 };
21 like($@, qr/Insecure dependency/, 'all filenames should be tainted');