]> git.vpit.fr Git - perl/modules/Scope-Upper.git/blobdiff - t/01-import.t
More tests for reap and localized at given/when
[perl/modules/Scope-Upper.git] / t / 01-import.t
index 06c02b3f42006ed68be186593bd797a7d55061d4..2699c192401b0ce6529a8a53513665140e537e17 100644 (file)
@@ -3,11 +3,29 @@
 use strict;
 use warnings;
 
-use Test::More tests => 11;
+use Test::More tests => 2 * 14;
 
 require Scope::Upper;
 
-for (qw/reap localize localize_elem localize_delete unwind TOP HERE UP DOWN SUB EVAL/) {
+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 $_";
 }