X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F01-import.t;h=700f9b32b3a1df59eeb44a88551c5db4d604370b;hb=eef3f2764e7018e3eaf2f1d11f249b510d023a2d;hp=9b3eb0b1a4138ac8642f6557a8aefe76fe41a99b;hpb=bac4fc46c2d48ce5db75de6c88e0983aeeedf865;p=perl%2Fmodules%2FScope-Upper.git diff --git a/t/01-import.t b/t/01-import.t index 9b3eb0b..700f9b3 100644 --- a/t/01-import.t +++ b/t/01-import.t @@ -3,11 +3,35 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More tests => 2 * 20; require Scope::Upper; -for (qw/reap localize localize_elem TOPLEVEL/) { +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 $_"; }