]> git.vpit.fr Git - perl/modules/Scope-Upper.git/blob - t/01-import.t
2699c192401b0ce6529a8a53513665140e537e17
[perl/modules/Scope-Upper.git] / t / 01-import.t
1 #!perl -T
2
3 use strict;
4 use warnings;
5
6 use Test::More tests => 2 * 14;
7
8 require Scope::Upper;
9
10 my %syms = (
11  reap            => '&;$',
12  localize        => '$$;$',
13  localize_elem   => '$$$;$',
14  localize_delete => '$$;$',
15  unwind          => undef,
16  want_at         => ';$',
17  TOP             => '',
18  HERE            => '',
19  UP              => ';$',
20  SUB             => ';$',
21  EVAL            => ';$',
22  SCOPE           => ';$',
23  CALLER          => ';$',
24  SU_THREADSAFE   => '',
25 );
26
27 for (keys %syms) {
28  eval { Scope::Upper->import($_) };
29  is $@,            '',        "import $_";
30  is prototype($_), $syms{$_}, "prototype $_";
31 }