X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F10-base.t;h=c1760c104e47e477750cb8b9db294868715a2435;hb=14a44e7b2f834cbd0d2ba8cc63deda55b3e5f0dd;hp=891a8cbc693669dca37055f1c77b5f1b2449f078;hpb=0661466030b3dd0fb805da10aaed883fbe931093;p=perl%2Fmodules%2FSub-Op.git diff --git a/t/10-base.t b/t/10-base.t index 891a8cb..c1760c1 100644 --- a/t/10-base.t +++ b/t/10-base.t @@ -3,9 +3,9 @@ use strict; use warnings; -use blib 't/Sub-Op-Test'; +use blib 't/Sub-Op-LexicalSub'; -use Test::More tests => 2 * 15 + 3 * 1 + 2 * 23; +use Test::More tests => 2 * 15 + 3 * 2 + 2 * 28; our $called; @@ -36,7 +36,7 @@ our $called; my $test = "{\n"; for my $name (@names) { $test .= <<" INIT" - use Sub::Op::Test $name => sub { + use Sub::Op::LexicalSub $name => sub { ++\$called; my \$exp = shift \@exp; is_deeply \\\@_, \$exp, '$name: arguments are correct'; @@ -142,3 +142,7 @@ foo 1; bar 2; ---- 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