X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F11-pkg.t;h=e97b7048c548a88ec27761e20696e2fd3b725feb;hb=8c014a64b4ed83a697c0109af2c1555bc8c26ae9;hp=bd4ebb3504a069a73664e22e82e99557dcd24063;hpb=a458a01af6d6d0e328ffc36afdcbd96628ae2e71;p=perl%2Fmodules%2Fsubs-auto.git diff --git a/t/11-pkg.t b/t/11-pkg.t index bd4ebb3..e97b704 100644 --- a/t/11-pkg.t +++ b/t/11-pkg.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 12; +use Test::More tests => 16; our $foo; @@ -21,6 +21,10 @@ our $foo; is($@, '', 'compiled to foo(3)'); is($foo, 3, 'main::foo was really called'); + eval { subs::auto::Test::Pkg::foo 4 }; + is($@, '', 'compiled to subs::auto::Test::Pkg::foo(4)'); + is($foo, 8, 'subs::auto::Test::Pkg::foo was really called'); + { package subs::auto::Test::Pkg; @@ -35,6 +39,16 @@ our $foo; } } +{ + package subs::auto::Test::Pkg; + + use subs::auto; + + eval { foo 8 }; + Test::More::is($@, '', 'compiled to foo(8)'); + Test::More::is($foo, 16, 'subs::auto::Test::Pkg::foo was really called'); +} + { use subs::auto in => '::';