X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FSub-Op.git;a=blobdiff_plain;f=t%2F10-base.t;fp=t%2F10-base.t;h=a69a7ae1761542a23ec3df3654c6cb7fa91c79f1;hp=6e6b5d12eeb0f0877693bde8e734e81bca103666;hb=0eb003f3bbeeada878cab10f7dabc020c775b666;hpb=302bf09fbd4b673e199bdd22b330ebbdbec4e1fe diff --git a/t/10-base.t b/t/10-base.t index 6e6b5d1..a69a7ae 100644 --- a/t/10-base.t +++ b/t/10-base.t @@ -5,7 +5,7 @@ use warnings; use blib 't/Sub-Op-LexicalSub'; -use Test::More tests => (1 + 3) * 16 + (1 + 2 * 3) * 2 + 2 * 29; +use Test::More tests => (1 + 3) * 17 + (1 + 2 * 3) * 2 + 2 * 31; our $called; @@ -161,3 +161,9 @@ foo, bar # () # [ 1 ], [ 2 ] # foo, bar foo 1, foo(2), 3, bar(4, foo(bar, 5), 6); ---- foo, bar # @_ # [ 2 ], [ ], [ 5 ], [ 4, 5, 6 ], [ 1, 2, 3, 4, 5, 6 ] # foo, bar, foo, bar, foo +#### +foo 0, sub { + foo $_[0], 2, $_[1] +}->(1, 3), 4; +---- +foo # @_ # [ 1, 2, 3 ], [ 0, 1, 2, 3, 4 ]