This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
959ba7970012abe40bcad4d83ca35899f9a749fd
[perl5.git] / cpan / Text-ParseWords / t / taint.t
1 #!./perl -Tw
2 # [perl #33173] shellwords.pl and tainting
3
4 use Text::ParseWords qw(shellwords old_shellwords);
5 use Scalar::Util qw(tainted);
6
7 print "1..2\n";
8
9 print "not " if grep { not tainted($_) } shellwords("$0$^X");
10 print "ok 1\n";
11
12 print "not " if grep { not tainted($_) } old_shellwords("$0$^X");
13 print "ok 2\n";