X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fsub-quote.t;h=301366ef5aad1d74619f83505089276b8ff196cb;hb=master;hp=4cc9a1deeb486111b8f2cd57334ed912b2f142d0;hpb=55d91f641bc43e5f929e35dc653a3aeea2497db8;p=gitmo%2FMoo.git diff --git a/t/sub-quote.t b/t/sub-quote.t index 4cc9a1d..301366e 100644 --- a/t/sub-quote.t +++ b/t/sub-quote.t @@ -47,4 +47,16 @@ like( 'exception contains correct name' ); +quote_sub 'Foo::four' => q{ + return 5; +}; + +my $quoted = quoted_from_sub(\&Foo::four); +like $quoted->[1], qr/return 5;/, + 'can get quoted from installed sub'; +Foo::four(); +my $quoted2 = quoted_from_sub(\&Foo::four); +is $quoted2->[1], undef, + "can't get quoted from installed sub after undefer"; + done_testing;