diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-12-06 19:19:13 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-12-09 09:47:19 -0700 |
commit | a9b7c63715bd82e15b815c96e5e1c6b87ab46f7b (patch) | |
tree | 1d3deb3f5e5f21e249303721410da56d3712cee4 /lib/locale.t | |
parent | a9c4383684955582336fa9f07ca1f378d84bdb99 (diff) | |
download | perl-a9b7c63715bd82e15b815c96e5e1c6b87ab46f7b.tar.gz |
locale.t: Add optional test name supplement
This allows tests to have extra stuff passed in that will be printed as
part of the test results
Diffstat (limited to 'lib/locale.t')
-rw-r--r-- | lib/locale.t | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/locale.t b/lib/locale.t index 26a7bd4d62..e75087fbce 100644 --- a/lib/locale.t +++ b/lib/locale.t @@ -89,12 +89,16 @@ sub is_tainted { # hello, camel two. not eval { $dummy = join("", @_), kill 0; 1 } } -sub check_taint ($) { - ok is_tainted($_[0]), "verify that is tainted"; +sub check_taint ($;$) { + my $message_tail = $_[1] // ""; + $message_tail = ": $message_tail" if $message_tail; + ok is_tainted($_[0]), "verify that is tainted$message_tail"; } -sub check_taint_not ($) { - ok((not is_tainted($_[0])), "verify that isn't tainted"); +sub check_taint_not ($;$) { + my $message_tail = $_[1] // ""; + $message_tail = ": $message_tail" if $message_tail; + ok((not is_tainted($_[0])), "verify that isn't tainted$message_tail"); } use locale; # engage locale and therefore locale taint. |