Add failing test for deparsing (re)named subs
gfx [Mon, 31 Aug 2009 02:26:42 +0000 (11:26 +0900)]
Test for the issue described in RT#42725.

t/RT42725_deparse.t [new file with mode: 0644]

diff --git a/t/RT42725_deparse.t b/t/RT42725_deparse.t
new file mode 100644 (file)
index 0000000..7e61777
--- /dev/null
@@ -0,0 +1,15 @@
+use strict;
+use warnings;
+use Test::More tests => 2;
+
+use Sub::Name;
+
+use B::Deparse;
+
+my $source = eval {
+       B::Deparse->new->coderef2text(subname foo => sub{ @_ });
+};
+
+ok !$@;
+
+like $source, qr/\@\_/;