X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F01-import.t;h=dcd2525a7ab27f8fa6dfbff053675d36ee0ffef5;hb=1cac52223ba0983d5d4007ab608fe4ea645eb037;hp=76452a0f5692afac73ea25396743e04356c233f2;hpb=7c5f28e56c17629e34fa0b2e6e4626e040f9c21d;p=perl%2Fmodules%2FScope-Upper.git diff --git a/t/01-import.t b/t/01-import.t index 76452a0..dcd2525 100644 --- a/t/01-import.t +++ b/t/01-import.t @@ -3,11 +3,33 @@ use strict; use warnings; -use Test::More tests => 13; +use Test::More tests => 2 * 18; require Scope::Upper; -for (qw/reap localize localize_elem localize_delete unwind want_at TOP HERE UP DOWN SUB EVAL CALLER/) { +my %syms = ( + reap => '&;$', + localize => '$$;$', + localize_elem => '$$$;$', + localize_delete => '$$;$', + unwind => undef, + yield => 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 $_"; }