]> git.vpit.fr Git - perl/modules/Scope-Upper.git/blobdiff - t/01-import.t
Fix numerous localizations in the same scope not happening
[perl/modules/Scope-Upper.git] / t / 01-import.t
index a0134bb818be80889db78a6c9fb5c8932daadbaf..2699c192401b0ce6529a8a53513665140e537e17 100644 (file)
@@ -3,11 +3,29 @@
 use strict;
 use warnings;
 
-use Test::More tests => 13;
+use Test::More tests => 2 * 14;
 
 require Scope::Upper;
 
-for (qw/reap localize localize_elem localize_delete unwind want_at TOP HERE UP SUB EVAL SCOPE CALLER/) {
+my %syms = (
+ reap            => '&;$',
+ localize        => '$$;$',
+ localize_elem   => '$$$;$',
+ localize_delete => '$$;$',
+ unwind          => undef,
+ want_at         => ';$',
+ TOP             => '',
+ HERE            => '',
+ UP              => ';$',
+ SUB             => ';$',
+ EVAL            => ';$',
+ SCOPE           => ';$',
+ CALLER          => ';$',
+ SU_THREADSAFE   => '',
+);
+
+for (keys %syms) {
  eval { Scope::Upper->import($_) };
- is($@, '', 'import ' . $_);
+ is $@,            '',        "import $_";
+ is prototype($_), $syms{$_}, "prototype $_";
 }