X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FTest-Leaner.git;a=blobdiff_plain;f=t%2F02-import-arg.t;h=71dc90c950372b5753ae996c9a236706a75450a0;hp=fd6f0f9835a1bae3b1ce6dd709ae454d01927825;hb=d8f274f085e5af023435df3abc2d0671f539e627;hpb=7b03c18e358942c3388e3ba4d93319333a25b9cf diff --git a/t/02-import-arg.t b/t/02-import-arg.t index fd6f0f9..71dc90c 100644 --- a/t/02-import-arg.t +++ b/t/02-import-arg.t @@ -50,7 +50,7 @@ sub check_imports { delete $this_stash->{$_} for @default_exports, keys %imported, @not_imported; } -Test::More::plan(tests => 8 * @default_exports + 7 + 2); +Test::More::plan(tests => 9 * @default_exports + 8 + 3); check_imports(); @@ -72,6 +72,15 @@ check_imports(); check_imports([ ], [ 'nonexistent' ]); } +{ + local $@; + eval { + Test::Leaner->import(import => [ 'use_ok' ]); + }; + Test::More::like($@, qr/^"use_ok" is not exported by the Test::Leaner module/, 'import "use_ok" croaks'); + check_imports([ ], [ 'use_ok' ]); +} + { local $@; eval {