X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FImport-Into.git;a=blobdiff_plain;f=t%2Fimport_into.t;h=7566438ea407fb3d9a912a3773cc69051a74cc34;hp=12b200b08d94da8ae7eced7cdb8dcc74bfee30c2;hb=97e7f522c95bef94c21459ef74e181bfc1c63a63;hpb=a6e3c44c68290b6b3f7a6aee792fffa5085f5151 diff --git a/t/import_into.t b/t/import_into.t index 12b200b..7566438 100644 --- a/t/import_into.t +++ b/t/import_into.t @@ -103,6 +103,25 @@ BEGIN { } } +@importcaller = (); +$version = undef; +eval q{ + package ExplicitLevel; + +#line 42 "explicit-level.pl" + use LevelExporter; + 1; +} or die $@; + +is $importcaller[0], 'ExplicitLevel', + 'import with level in hash has correct package'; +is $importcaller[1], 'explicit-level.pl', + 'import with level in hash has correct file'; +is $importcaller[2], 42, + 'import with level in hash has correct line'; +is $version, 219, + 'import with level in hash has correct version'; + ok( !IPC::Open3->can("open3"), "IPC::Open3 is unloaded" ); IPC::Open3->import::into("TestPackage"); ok( TestPackage->can("open3"), "IPC::Open3 was use'd and import::into'd" );