6 use Test::More tests => 19;
8 use Scope::Upper qw/want_at UP HERE/;
11 my ($w, $exp, $desc) = @_;
22 is $cx->($w), $cx->($exp), $desc;
27 check want_at, undef, 'main : want_at';
28 check want_at(HERE), undef, 'main : want_at HERE';
29 check want_at(UP), undef, 'main : want_at UP';
30 check want_at(-1), undef, 'main : want_at -1';
33 check want_at, 1, 'sub0 : want_at';
35 check want_at, 1, 'sub : want_at';
36 check want_at(UP), 1, 'sub : want_at UP';
38 check want_at, 1, 'for : want_at';
39 check want_at(UP), 1, 'for : want_at UP';
40 check want_at(UP UP), 1, 'for : want_at UP UP';
43 check want_at, undef, 'eval string : want_at';
44 check want_at(UP), 1, 'eval string : want_at UP';
45 check want_at(UP UP), 1, 'eval string : want_at UP UP';
49 check want_at, 0, 'do : want_at';
50 check want_at(UP), 0, 'do : want_at UP';
51 check want_at(UP UP), 1, 'do : want_at UP UP';
53 check want_at, 0, 'eval : want_at';
54 check want_at(UP), 1, 'eval : want_at UP';
55 check want_at(UP UP), 1, 'eval : want_at UP UP';