]> git.vpit.fr Git - perl/modules/Scope-Upper.git/blob - t/01-import.t
Implement leave()
[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 * 19;
7
8 require Scope::Upper;
9
10 my %syms = (
11  reap            => '&;$',
12  localize        => '$$;$',
13  localize_elem   => '$$$;$',
14  localize_delete => '$$;$',
15  unwind          => undef,
16  yield           => undef,
17  leave           => undef,
18  want_at         => ';$',
19  uplevel         => '&@',
20  uid             => ';$',
21  validate_uid    => '$',
22  TOP             => '',
23  HERE            => '',
24  UP              => ';$',
25  SUB             => ';$',
26  EVAL            => ';$',
27  SCOPE           => ';$',
28  CALLER          => ';$',
29  SU_THREADSAFE   => '',
30 );
31
32 for (keys %syms) {
33  eval { Scope::Upper->import($_) };
34  is $@,            '',        "import $_";
35  is prototype($_), $syms{$_}, "prototype $_";
36 }