Skip to content

Commit

Permalink
Test that captures can be cloned.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed May 13, 2016
1 parent a4d08e6 commit 39989e9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion t/nqp/76-capture.t
Expand Up @@ -2,7 +2,7 @@ if nqp::getcomp('nqp').backend.name eq 'parrot' {
say("1..0 # Skipped: nqp::savecapture is broken on parrot");
nqp::exit(0);
}
plan(18);
plan(19);

my $x;
sub savecapture($arg) {
Expand Down Expand Up @@ -66,3 +66,9 @@ class Foo {

my $foo := Foo.new(attr => "foobar");
$foo.foo(10,20,30);


my $capture := savecapture(100);

my $clone := nqp::clone($capture);
ok(nqp::captureposarg($clone, 0) == 100,"nqp::captureposarg on a cloned capture");

0 comments on commit 39989e9

Please sign in to comment.