From fa979c9227033a80302f12612eb8c05e654e338b Mon Sep 17 00:00:00 2001 From: Zoffix Znet Date: Sat, 21 Apr 2018 21:30:57 +0000 Subject: [PATCH] Test p6trialbind with `where`s Ensure it notices `where` on capture / named slurpy --- t/02-rakudo/08-inline-native-arith.t | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/t/02-rakudo/08-inline-native-arith.t b/t/02-rakudo/08-inline-native-arith.t index 78e4ec699cf..92973d9c9dd 100644 --- a/t/02-rakudo/08-inline-native-arith.t +++ b/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); @@ -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'; +}