Skip to content

Commit

Permalink
Add a (passing) test
Browse files Browse the repository at this point in the history
Adding these from #410; if nothing else, this one is an interesting
regression test.
  • Loading branch information
Carl Masak committed Feb 19, 2019
1 parent 1fc4040 commit c7c082c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions t/features/hygiene.t
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,25 @@ use _007::Test;
"variables can be declared as usual inside of a quasi (and survive)";
}

{
my $program = q:to/./;
my a = "OH";
macro moo(x) {
my a = "macro";
return quasi {
{{{x}}}
}
}
a = a ~ " HAI";
say(moo(a));
.

outputs
$program,
"OH HAI\n",
"mainline variable survive all the way through a macro/quasi expansion";
}

done-testing;

0 comments on commit c7c082c

Please sign in to comment.