This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_NONE
[perl5.git] / t / lib / glob-taint.t
CommitLineData
72b16652
GS
1#!./perl -T
2
3BEGIN {
4 chdir 't' if -d 't';
7369a524
CN
5 if ($^O eq 'MacOS') {
6 @INC = qw(: ::lib ::macos:lib);
7 } else {
8 @INC = '.';
9 push @INC, '../lib';
10 }
d2a01882
GS
11 require Config; import Config;
12 if ($Config{'extensions'} !~ /\bFile\/Glob\b/i) {
13 print "1..0\n";
14 exit 0;
15 }
72b16652
GS
16 print "1..2\n";
17}
18END {
19 print "not ok 1\n" unless $loaded;
20}
21use File::Glob;
22$loaded = 1;
23print "ok 1\n";
24
25# all filenames should be tainted
00c80938 26@a = File::Glob::bsd_glob("*");
72b16652
GS
27eval { $a = join("",@a), kill 0; 1 };
28unless ($@ =~ /Insecure dependency/) {
29 print "not ";
30}
31print "ok 2\n";