Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Test that contextuals are not implemented as globals.
  • Loading branch information
pmurias committed Dec 22, 2012
1 parent 6d4973f commit 3370a7d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion t/nqp/21-contextual.t
Expand Up @@ -2,7 +2,7 @@

# Tests for contextual variables

plan(6);
plan(7);

sub foo() { $*VAR }

Expand All @@ -23,6 +23,8 @@ sub foo() { $*VAR }
ok( foo() eq 'def', 'called subroutine sees caller $*VAR');
ok( bar() eq 'def', 'called subroutine sees caller not outer');
}

ok($*VAR eq 'abc', 'nested contextuals don\'t affect outer ones');
}


0 comments on commit 3370a7d

Please sign in to comment.