X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F01-import.t;h=700f9b32b3a1df59eeb44a88551c5db4d604370b;hb=8aa5517d42b61e877ca7e4198f12ab879fa8218b;hp=ef8937c62b698542e158ec150d7aeb23dd039068;hpb=02798a015a7fae0ff3d924b3270def3996e4210b;p=perl%2Fmodules%2FScope-Upper.git diff --git a/t/01-import.t b/t/01-import.t index ef8937c..700f9b3 100644 --- a/t/01-import.t +++ b/t/01-import.t @@ -3,11 +3,35 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 2 * 20; require Scope::Upper; -for (qw/reap localize localize_elem TOP CURRENT UP DOWN SUB EVAL/) { +my %syms = ( + reap => '&;$', + localize => '$$;$', + localize_elem => '$$$;$', + localize_delete => '$$;$', + unwind => undef, + yield => undef, + leave => undef, + want_at => ';$', + context_info => ';$', + uplevel => '&@', + uid => ';$', + validate_uid => '$', + TOP => '', + HERE => '', + UP => ';$', + SUB => ';$', + EVAL => ';$', + SCOPE => ';$', + CALLER => ';$', + SU_THREADSAFE => '', +); + +for (keys %syms) { eval { Scope::Upper->import($_) }; - is($@, '', 'import ' . $_); + is $@, '', "import $_"; + is prototype($_), $syms{$_}, "prototype $_"; }