Skip to content

Commit 3370a7d

Browse files
committed
Test that contextuals are not implemented as globals.
1 parent 6d4973f commit 3370a7d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

t/nqp/21-contextual.t

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Tests for contextual variables
44

5-
plan(6);
5+
plan(7);
66

77
sub foo() { $*VAR }
88

@@ -23,6 +23,8 @@ sub foo() { $*VAR }
2323
ok( foo() eq 'def', 'called subroutine sees caller $*VAR');
2424
ok( bar() eq 'def', 'called subroutine sees caller not outer');
2525
}
26+
27+
ok($*VAR eq 'abc', 'nested contextuals don\'t affect outer ones');
2628
}
2729

2830

0 commit comments

Comments
 (0)