Introduce t/lib/peek.t.
[p5sagit/p5-mst-13.2.git] / t / lib / glob-taint.t
CommitLineData
72b16652 1#!./perl -T
2
3BEGIN {
4 chdir 't' if -d 't';
5 unshift @INC, '../lib';
d2a01882 6 require Config; import Config;
7 if ($Config{'extensions'} !~ /\bFile\/Glob\b/i) {
8 print "1..0\n";
9 exit 0;
10 }
72b16652 11 print "1..2\n";
12}
13END {
14 print "not ok 1\n" unless $loaded;
15}
16use File::Glob;
17$loaded = 1;
18print "ok 1\n";
19
20# all filenames should be tainted
00c80938 21@a = File::Glob::bsd_glob("*");
72b16652 22eval { $a = join("",@a), kill 0; 1 };
23unless ($@ =~ /Insecure dependency/) {
24 print "not ";
25}
26print "ok 2\n";