From: Matt S Trout Date: Sun, 21 Oct 2007 22:17:35 +0000 (+0000) Subject: test I never noticed to add X-Git-Tag: 0.005000~121 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8e0cf19220c81ec24955bb1ceb20641bf001f085;p=p5sagit%2FDevel-Declare.git test I never noticed to add --- diff --git a/t/build_sub_installer.t b/t/build_sub_installer.t new file mode 100644 index 0000000..8a73730 --- /dev/null +++ b/t/build_sub_installer.t @@ -0,0 +1,20 @@ +use strict; +use warnings; +use Test::More 'no_plan'; + +use Devel::Declare (); + +BEGIN { + Devel::Declare->build_sub_installer('Foo', 'bar', '&') + ->(sub { $_[0]->("woot"); }); +} + +my $args; + +{ + package Foo; + + bar { $args = join(', ', @_); }; +} + +is($args, 'woot', 'sub installer worked');