X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F01simple.t;h=e41d27f670f620e5956bf60fb32ff5a498334c79;hb=115c342b3d84b8dd078f7e3779358662927473fc;hp=2d518734430c11e5ccd99b36197485bffd317b66;hpb=815b5be2c946367c4d74c815599ea9d706c0f5e3;p=p5sagit%2FPackage-Variant.git diff --git a/t/01simple.t b/t/01simple.t index 2d51873..e41d27f 100644 --- a/t/01simple.t +++ b/t/01simple.t @@ -72,8 +72,8 @@ BEGIN { package TestArrayImports; use Package::Variant importing => [ - TestImportableA => undef, - TestImportableB => undef, + 'TestImportableA', + 'TestImportableB', ]; sub make_variant { } $INC{'TestArrayImports.pm'} = __FILE__; @@ -85,4 +85,16 @@ TestArrayImports(23); is_deeply [@imported], [qw( TestImportableA TestImportableB )], 'multiple imports in the right order'; +like exception { + Package::Variant->import( + importing => \'foo', subs => [qw( foo )], + ); +}, qr/importing.+option.+hash.+array/i, 'invalid "importing" option'; + +like exception { + Package::Variant->import( + importing => { foo => \'bar' }, subs => [qw( bar )], + ); +}, qr/import.+argument.+not.+array/i, 'invalid import argument list'; + done_testing;