summaryrefslogtreecommitdiff
path: root/t/op/taint.t
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1997-04-03 10:03:25 +1200
committerChip Salzenberg <chip@atlantic.net>1997-04-03 10:03:25 +1200
commit5aabfad66ac77650f584e2f07af91645e19fe296 (patch)
treeac96571984ba780e9ae7736cfe85dd17f6cfd865 /t/op/taint.t
parent4a6725af9146bd7faaa10aa5429ff009d393fd6d (diff)
downloadperl-5aabfad66ac77650f584e2f07af91645e19fe296.tar.gz
[inseparable changes from match from perl-5.003_97 to perl-5.003_97a]
CORE PORTABILITY Subject: Add support for Cygwin32 (GNU-Win32) -- very low impact Date: Thu, 3 Apr 1997 09:21:17 +0100 From: John Cerney <j-cerney1@ti.com> Files: MANIFEST README.cygwin32 cygwin32/cw32imp.h cygwin32/gcc2 cygwin32/ld2 cygwin32/perlgcc cygwin32/perlld ext/DynaLoader/dl_cygwin32.xs hints/cygwin32.sh perl.h pp_sys.c Msg-ID: 199704030821.JAA08762@pluto.tiuk.ti.com (applied based on p5p patch as commit 2a079e0090406b1b2e50643540f149206c9e9de8) Subject: Win32 update (six patches) From: Gurusamy Sarathy <gsar@engin.umich.edu> Files: MANIFEST README.win32 dosish.h t/io/fs.t t/io/tell.t t/lib/io_tell.t t/op/magic.t t/op/mkdir.t t/op/runlevel.t t/op/stat.t t/op/taint.t win32/Makefile win32/VC-2.0/pod.mak win32/makedef.pl win32/pod.mak win32/win32.c win32/win32.h win32/win32io.c win32/win32io.h win32/win32iop.h LIBRARY AND EXTENSIONS Subject: Math::Trig, based on (and from an author of) Math::Complex From: Chip Salzenberg <chip@perl.com> Files: MANIFEST lib/Math/Complex.pm lib/Math/Trig.pm pod/perldelta.pod t/lib/complex.t t/lib/trig.t OTHER CORE CHANGES Subject: Fix const-sub-related panic on C<sub foo { my $x; 0 } foo> From: Chip Salzenberg <chip@perl.com> Files: op.c Subject: Fix warning for useless C<1..2> From: Chip Salzenberg <chip@perl.com> Files: op.c Subject: Minor cleanups Date: Thu, 03 Apr 1997 19:56:57 -0500 From: Gurusamy Sarathy <gsar@engin.umich.edu> Files: mg.c mg.h perl.c Msg-ID: 199704040056.TAA22253@aatma.engin.umich.edu (applied based on p5p patch as commit 609794497049cf42bdd2396c04cbb7728e10374d) Subject: Eliminate unreliable warning with %SIG and strict refs From: Chip Salzenberg <chip@perl.com> Files: mg.c Subject: Fix impossible test in vivification From: Chip Salzenberg <chip@perl.com> Files: mg.c
Diffstat (limited to 't/op/taint.t')
-rwxr-xr-xt/op/taint.t27
1 files changed, 16 insertions, 11 deletions
diff --git a/t/op/taint.t b/t/op/taint.t
index d0ba887948..81d698ae8b 100755
--- a/t/op/taint.t
+++ b/t/op/taint.t
@@ -72,7 +72,7 @@ sub test ($$;$) {
}
# We need an external program to call.
-my $ECHO = "./echo$$";
+my $ECHO = ($Is_MSWin32 ? ".\\echo$$" : "./echo$$");
END { unlink $ECHO }
open PROG, "> $ECHO" or die "Can't create $ECHO: $!";
print PROG 'print "@ARGV\n"', "\n";
@@ -87,18 +87,23 @@ print "1..112\n";
{
$ENV{'DCL$PATH'} = '' if $Is_VMS;
- $ENV{PATH} = $TAINT;
- $ENV{IFS} = " \t\n";
- test 1, eval { `$echo 1` } eq '';
- test 2, $@ =~ /^Insecure \$ENV{PATH}/, $@;
-
- $ENV{PATH} = '';
- $ENV{IFS} = $TAINT;
- test 3, eval { `$echo 1` } eq '';
- test 4, $@ =~ /^Insecure \$ENV{IFS}/, $@;
+ if ($Is_MSWin32) {
+ print "# PATH/IFS tainting tests skipped\n";
+ for (1..4) { print "ok $_\n" }
+ }
+ else {
+ $ENV{PATH} = $TAINT;
+ $ENV{IFS} = " \t\n";
+ test 1, eval { `$echo 1` } eq '';
+ test 2, $@ =~ /^Insecure \$ENV{PATH}/, $@;
+ $ENV{PATH} = '';
+ $ENV{IFS} = $TAINT;
+ test 3, eval { `$echo 1` } eq '';
+ test 4, $@ =~ /^Insecure \$ENV{IFS}/, $@;
+ }
my $tmp;
- if ($^O eq 'os2' || $^O eq 'amigaos') {
+ if ($^O eq 'os2' || $^O eq 'amigaos' || $Is_MSWin32) {
print "# all directories are writeable\n";
}
else {