[perl #89896] Locale::Maketext test failure
authorJustin Case <>
Wed, 18 May 2011 20:43:24 +0000 (13:43 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 18 May 2011 20:43:24 +0000 (13:43 -0700)
when environment has variable containing unbalanced brackets

Patch is attached to escape brackets in the value of the environment
variable being used in the test.

dist/Locale-Maketext/t/09_compile.t

index e2bbe43..06db484 100644 (file)
@@ -11,6 +11,7 @@ use Locale::Maketext;
 my @ENV_values = values %ENV;
 my $tainted_value;
 do { $tainted_value = shift @ENV_values  } while(!$tainted_value || ref $tainted_value);
+$tainted_value =~ s/([\[\]])/~$1/g;
 
 ok(tainted($tainted_value), "\$tainted_value is tainted") or die('huh... %ENV has no entries? I don\'t know how to test taint without it');