summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2013-06-28 11:55:27 +1000
committerTony Cook <tony@develop-help.com>2013-06-28 14:53:12 +1000
commit72e8be865ba96e46b95723197c54710357d148a3 (patch)
tree81be1a920c6e413788938dd753d095f037997af5
parentfdf416b69a0b2fb8449bc55e1bf521f3b628b511 (diff)
downloadperl-72e8be865ba96e46b95723197c54710357d148a3.tar.gz
make sure the prototype actually matches
because: a) I think it better demonstrates the fix, the following failed without the patch: ./perl -Ilib -le 'my $proto = "\x{30cd}"; eval "sub f($proto) {}"; print prototype(\&f); print prototype(\&f) eq $proto' b) I can envision bugs that might preserve UTF-8 but mis-manage the content
-rw-r--r--t/op/lexsub.t3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/op/lexsub.t b/t/op/lexsub.t
index c77b2ff0a4..d717f42999 100644
--- a/t/op/lexsub.t
+++ b/t/op/lexsub.t
@@ -8,7 +8,7 @@ BEGIN {
*bar::like = *like;
}
no warnings 'deprecated';
-plan 137;
+plan 138;
# -------------------- Errors with feature disabled -------------------- #
@@ -432,6 +432,7 @@ package main;
my $coderef = eval "my sub foo (\$\x{30cd}) {1}; \\&foo";
my $proto = prototype $coderef;
ok(utf8::is_utf8($proto), "my sub with UTF8 proto maintains the UTF8ness");
+ is($proto, "\$\x{30cd}", "check the prototypes actually match");
}
{
my sub if() { 44 }