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