locale.t: Add test
authorKarl Williamson <public@khwilliamson.com>
Fri, 7 Dec 2012 02:20:22 +0000 (19:20 -0700)
committerKarl Williamson <public@khwilliamson.com>
Sun, 9 Dec 2012 16:47:19 +0000 (09:47 -0700)
This makes sure that taint isn't being added unnecessarily

lib/locale.t

index e75087f..6d491e4 100644 (file)
@@ -101,6 +101,10 @@ sub check_taint_not ($;$) {
     ok((not is_tainted($_[0])), "verify that isn't tainted$message_tail");
 }
 
+"\tb\t" =~ /^m?(\s)(.*)\1$/;
+check_taint_not   $&, "not tainted outside 'use locale'";
+;
+
 use locale;    # engage locale and therefore locale taint.
 
 check_taint_not   $a;