X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F01-import.t;h=247470562e4fea918e6ff7edc63ff0dc889b427d;hb=be1d59463692da1b5ef787aeffd0aedbef65664e;hp=da61bbc9d57789ee9e27544add8ea8b27572a6f6;hpb=0a7ed27cbdbb90c176fc6be11c48e70776c8df84;p=perl%2Fmodules%2FScope-Upper.git diff --git a/t/01-import.t b/t/01-import.t index da61bbc..2474705 100644 --- a/t/01-import.t +++ b/t/01-import.t @@ -3,13 +3,34 @@ use strict; use warnings; -use Test::More tests => 14; +use Test::More tests => 2 * 19; require Scope::Upper; -for (qw/reap localize localize_elem localize_delete unwind want_at - TOP HERE UP SUB EVAL SCOPE CALLER - SU_THREADSAFE/) { +my %syms = ( + reap => '&;$', + localize => '$$;$', + localize_elem => '$$$;$', + localize_delete => '$$;$', + unwind => undef, + yield => undef, + leave => undef, + want_at => ';$', + 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 $_"; }