use strict;
use warnings;
-use Test::More tests => 68;
+use Test::More tests => 69;
use Sub::Nary;
[ sub { eval { return } }, 0 ],
[ sub { eval { return 1, 2 } }, 2 ],
+ [ sub { eval { return 1, 2; 3, 4, 5 } }, 2 ],
[ sub { eval { }; return $x, 2 }, 2 ],
[ sub { return eval { 1, $x }; }, 2 ],
[ sub { return 1, eval { $x, eval { $h{foo} } } }, 3 ],
use strict;
use warnings;
-use Test::More tests => 12;
+use Test::More tests => 14;
use Sub::Nary;
[ sub { dies(), 1, do { $x ? @_ : 1 } },
{ die => 0.25, 4 => 0.125, 5 => 0.25, list => (0.25 + 0.5) * 0.5 } ],
- [ sub { eval "1, do { die }, 3" }, 'list' ],
- [ sub { eval { die } }, { 0 => 1 } ],
- [ sub { eval { $x ? die : (4, 5) } }, { 0 => 0.5, 2 => 0.5 } ],
+ [ sub { eval "1, do { die }, 3" }, 'list' ],
+ [ sub { eval { die } }, { 0 => 1 } ],
+ [ sub { eval { $x ? die : (4, 5) } }, { 0 => 0.5, 2 => 0.5 } ],
+ [ sub { eval { $x ? die : (4, 5) }; die if $@; 7 }, { die => 0.5, 1 => 0.5 } ],
+ [ sub { eval { $x ? die : return (4, 5) }; die if $@; 7 },
+ { 2 => 0.5, die => 0.25, 1 => 0.25 } ],
);
my $i = 1;