Skip to content

Commit

Permalink
Test p6trialbind with wheres
Browse files Browse the repository at this point in the history
Ensure it notices `where` on capture / named slurpy
  • Loading branch information
zoffixznet committed Apr 21, 2018
1 parent db7e79a commit fa979c9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions t/02-rakudo/08-inline-native-arith.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 2;
use nqp;
plan 4;

my $p = run($*EXECUTABLE, '--target=optimize',
'-e', 'my int $i = 1; for ^10 { $i = $i * 2 }', :out);
Expand All @@ -11,7 +11,13 @@ like $p.out.slurp(:close), /mul_i/,
{ # https://irclog.perlgeek.de/perl6-dev/2018-04-21#i_16073519
# https://irclog.perlgeek.de/perl6-dev/2018-04-21#i_16074725
# https://irclog.perlgeek.de/perl6-dev/2018-04-21#i_16075097
use nqp;
ok nqp::p6trialbind(:($?, $?, *%), nqp::list(Int, int), nqp::list(33, 1)),
'can trialbiand to a sig with slurpy named param';
}

{ # https://irclog.perlgeek.de/perl6-dev/2018-04-21#i_16075429
nok nqp::p6trialbind(:(| where *.so), nqp::list(), nqp::list()),
'trial bind notices `where` in the capture';
nok nqp::p6trialbind(:(*% where *.so), nqp::list(), nqp::list()),
'trial bind notices `where` in the named slurpy';
}

0 comments on commit fa979c9

Please sign in to comment.