Skip to content

Commit

Permalink
Merge pull request #577 from vrurg/rakudo_1205
Browse files Browse the repository at this point in the history
Add test for freezing Junction
  • Loading branch information
vrurg committed Sep 15, 2019
2 parents 3a4a84d + 5c858ed commit f08aff1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 12 additions & 1 deletion S03-junctions/misc.t
Expand Up @@ -3,7 +3,7 @@ use Test;
use lib $?FILE.IO.parent(2).add: 'packages/Test-Helpers';
use Test::Util;

plan 148;
plan 149;

=begin pod
Expand Down Expand Up @@ -535,6 +535,17 @@ subtest 'Junction .Str, .gist, and .perl' => {
is-deeply-junction $j.perl.EVAL, $j, "Junction.perl on $t junction roundtrips";
}
}
# GH rakudo/rakudo#1205
subtest q<meta-assignment to a scalar doesn't cause freezing> => {
plan 3;
my %junction_ops = :all<&>, :any<|>, :one<^>;
for %junction_ops.pairs -> (:key($type), :value($op)) {
doesn't-hang 'my $j = 1; $j ' ~ $op ~ '= 2; print $j.gist',
"junction '$type' doesn't freeze after assign metaop",
:out("{$type}(1, 2)"),
:err("");
}
}

# GH #2042
{
Expand Down
2 changes: 2 additions & 0 deletions S03-metaops/misc.t
@@ -1,5 +1,7 @@
use v6;
use lib <t/packages>;
use Test;
use Test::Helpers;

plan 1;

Expand Down

0 comments on commit f08aff1

Please sign in to comment.