use strict;
use warnings;
-use Test::More tests => 16;
+use Test::More tests => 17;
use Sub::Nary;
}
}
-sub retinif {
+sub retinif1 {
if (return 1, 2) {
return 1, 2, 3
} else {
}
}
+sub retinif2 {
+ if (do { return 2, 3 if $x }) {
+ return 4, 5, 6;
+ }
+}
+
my @tests = (
[ \&ret12, { 1 => 0.5, 2 => 0.5 } ],
[ \&ret12b, { 1 => 0.5, 2 => 0.5 } ],
[ \&ret1234, { 2 => 0.5, 3 => 0.25, 4 => 0.125, 1 => 0.125 } ],
- [ \&retinif, { 2 => 1 } ],
+ [ \&retinif1, { 2 => 1 } ],
+ [ \&retinif2, { 2 => 0.5, 3 => 0.25, 1 => 0.25 } ],
);
my $i = 1;