This is an automatically generated mail to inform you that tests are now available in t/spec/S14-traits/routines.t
commit fc49b0b54fe7d1a6e4f342c54dfac79dc9a25736 Author: moritz <mor...@c213334d-75ef-0310-aa23-eaa082d1ae64> Date: Thu Oct 22 19:59:04 2009 +0000 [t/spec] Tests for RT #69893, wrapping subroutines in traits git-svn-id: http://svn.pugscode.org/p...@28885 c213334d-75ef-0310-aa23-eaa082d1ae64 diff --git a/t/spec/S14-traits/routines.t b/t/spec/S14-traits/routines.t index d7e4691..a43c77f 100644 --- a/t/spec/S14-traits/routines.t +++ b/t/spec/S14-traits/routines.t @@ -1,7 +1,7 @@ use v6; use Test; -plan 8; +plan *; # L<S14/Traits/> @@ -38,4 +38,20 @@ is &cheezburger.description, 'tasty', 'named trait handler applied other role s is lolcat(), "undescribable", 'can call sub that has had a trait applied to it by named param without arg'; is &lolcat.description, 'missing description!', 'named trait handler applied other role without argument'; +#?rakudo skip 'RT 69893' +{ + my $recorder = ''; + role woowoo { } + multi trait_mod:<is>(Routine $c, woowoo) { + $c.wrap: sub { + $recorder ~= 'wrap'; + } + } + sub foo is woowoo { }; + lives_ok &foo, 'Can call subroutine that was wrapped by a trait'; + is $recorder, 'wrap', 'and the wrapper has been called once'; +} + +done_testing(); + # vim: ft=perl6