Unicode properties: allow also intra(wordbreak)name whitespace,
[p5sagit/p5-mst-13.2.git] / t / op / taint.t
index effb12c..8ae8202 100755 (executable)
@@ -109,7 +109,7 @@ print PROG 'print "@ARGV\n"', "\n";
 close PROG;
 my $echo = "$Invoke_Perl $ECHO";
 
-print "1..174\n";
+print "1..176\n";
 
 # First, let's make sure that Perl is checking the dangerous
 # environment variables. Maybe they aren't set yet, so we'll
@@ -121,7 +121,7 @@ print "1..174\n";
     delete @ENV{@MoreEnv};
     $ENV{TERM} = 'dumb';
 
-    if ($Is_Cygwin) {
+    if ($Is_Cygwin && ! -f 'cygwin1.dll') {
        system("/usr/bin/cp /usr/bin/cygwin1.dll .") &&
            die "$0: failed to cp cygwin1.dll: $!\n";
        END { unlink "cygwin1.dll" } # yes, done for all platforms...
@@ -839,3 +839,49 @@ else {
     print "ok 174\n";
 }
 
+
+{
+    # Bug ID 20010730.010
+
+    my $i = 0;
+
+    sub Tie::TIESCALAR {
+        my $class =  shift;
+        my $arg   =  shift;
+
+        bless \$arg => $class;
+    }
+
+    sub Tie::FETCH {
+        $i ++;
+        ${$_ [0]}
+    }
+
+    package main;
+    my $bar = "The Big Bright Green Pleasure Machine";
+    taint_these $bar;
+    tie my ($foo), Tie => $bar;
+
+    my $baz = $foo;
+
+    print $i == 1 ? "ok 175\n" : "not ok 175\n"
+
+}
+
+{
+    # Check that all environment variables are tainted.
+    my @untainted;
+    while (my ($k, $v) = each %ENV) {
+       if (!tainted($v) &&
+           # These we have untainted explicitly earlier.
+           $k !~ /^(BASH_ENV|CDPATH|ENV|IFS|PATH|TEMP|TERM|TMP)$/) {
+           push @untainted, "# '$k' = '$v'\n";
+       }
+    }
+    print @untainted == 0 ? "ok 176\n" : "not ok 176\n";
+    print "# untainted:\n", @untainted if @untainted; 
+}
+
+