Skip to content

Commit

Permalink
Exceptions from lazy-evaluated things do not crash REPL
Browse files Browse the repository at this point in the history
RT#128470
  • Loading branch information
zoffixznet committed Jul 8, 2016
1 parent dbb6a58 commit d9781be
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion S19-command-line/repl.t
Expand Up @@ -4,7 +4,7 @@ use lib <t/spec/packages>;
use Test;
use Test::Util;

plan 5;
plan 6;

# Sanity check that the repl is working at all.
my $cmd = $*DISTRO.is-win
Expand Down Expand Up @@ -43,3 +43,14 @@ is shell($cmd).exitcode, 42, 'exit(42) in executed REPL got run';
'stdout is correct';
}, 'Pressing CTRL+D in REPL produces correct output on exit';
}

{
# RT #128470
my $code-to-run = q/[1..99].map:{[$_%%5&&'fizz', $_%%3&&'buzz'].grep:Str}/
~ "\nsay 'We are still alive';\nexit\n";

is_run_repl $code-to-run, {
out => /'Cannot resolve caller grep' .* 'We are still alive'/,
err => '',
}, 'exceptions from lazy-evaluated things do not crash REPL';
}

0 comments on commit d9781be

Please sign in to comment.