Skip to content

Commit

Permalink
Test nqp::elems on a ctx
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Apr 24, 2017
1 parent c16081e commit 54d64e2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion t/nqp/101-lexpad-stuff.t
@@ -1,4 +1,4 @@
plan(14);
plan(15);
sub more-inner() {
my $outer := nqp::ctxcaller(nqp::ctx());
my $outermost := nqp::ctxcaller(nqp::ctxcaller(nqp::ctx()));
Expand Down Expand Up @@ -84,3 +84,14 @@ outer();
}

ok(nqp::istrue(nqp::ctx()) == 1, 'ctxs are true');


my sub elems_on_caller() {
is(nqp::elems(nqp::ctxcaller(nqp::ctx())), 3, 'nqp::elems on a ctx');
}
{
my $*a := 100;
my $*b := 200;
my $*c := 300;
elems_on_caller();
}

0 comments on commit 54d64e2

Please sign in to comment.