Commit | Line | Data |
72b16652 |
1 | #!./perl -T |
2 | |
3 | BEGIN { |
4 | chdir 't' if -d 't'; |
7369a524 |
5 | if ($^O eq 'MacOS') { |
6 | @INC = qw(: ::lib ::macos:lib); |
7 | } else { |
8 | @INC = '.'; |
9 | push @INC, '../lib'; |
10 | } |
d2a01882 |
11 | require Config; import Config; |
12 | if ($Config{'extensions'} !~ /\bFile\/Glob\b/i) { |
13 | print "1..0\n"; |
14 | exit 0; |
15 | } |
72b16652 |
16 | print "1..2\n"; |
17 | } |
18 | END { |
19 | print "not ok 1\n" unless $loaded; |
20 | } |
21 | use File::Glob; |
22 | $loaded = 1; |
23 | print "ok 1\n"; |
24 | |
25 | # all filenames should be tainted |
00c80938 |
26 | @a = File::Glob::bsd_glob("*"); |
72b16652 |
27 | eval { $a = join("",@a), kill 0; 1 }; |
28 | unless ($@ =~ /Insecure dependency/) { |
29 | print "not "; |
30 | } |
31 | print "ok 2\n"; |