]> git.vpit.fr Git - perl/modules/Scope-Upper.git/blob - t/01-import.t
fix unwind()
[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 * 20;
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  context_info    => ';$',
20  uplevel         => '&@',
21  uid             => ';$',
22  validate_uid    => '$',
23  TOP             => '',
24  HERE            => '',
25  UP              => ';$',
26  SUB             => ';$',
27  EVAL            => ';$',
28  SCOPE           => ';$',
29  CALLER          => ';$',
30  SU_THREADSAFE   => '',
31 );
32
33 for (keys %syms) {
34  eval { Scope::Upper->import($_) };
35  is $@,            '',        "import $_";
36  is prototype($_), $syms{$_}, "prototype $_";
37 }