xref: /openbsd-src/gnu/usr.bin/perl/cpan/Text-ParseWords/t/taint.t (revision 91f110e064cd7c194e59e019b83bb7496c1c84d4)
1#!./perl -Tw
2# [perl #33173] shellwords.pl and tainting
3
4use Text::ParseWords qw(shellwords old_shellwords);
5use Scalar::Util qw(tainted);
6
7print "1..2\n";
8
9print "not " if grep { not tainted($_) } shellwords("$0$^X");
10print "ok 1\n";
11
12print "not " if grep { not tainted($_) } old_shellwords("$0$^X");
13print "ok 2\n";
14