Skip to content

Commit cf752f7

Browse files
committed
-I dir shows up in REPL
RT#127695
1 parent 820e4f7 commit cf752f7

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

S19-command-line/repl.t

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use lib <t/spec/packages>;
44
use Test;
55
use Test::Util;
66

7-
plan 6;
7+
plan 8;
88

99
# Sanity check that the repl is working at all.
1010
my $cmd = $*DISTRO.is-win
@@ -56,3 +56,20 @@ is shell($cmd).exitcode, 42, 'exit(42) in executed REPL got run';
5656
err => '',
5757
}, 'exceptions from lazy-evaluated things do not crash REPL';
5858
}
59+
60+
{
61+
# RT #127695
62+
my $temp-dir = $*TMPDIR.child('rakudo-roast-RT127695-test' ~ rand);
63+
is $temp-dir.mkdir, True,
64+
'successfully created temp directory to use for -I in test';
65+
66+
my $proc = &CORE::run(
67+
$*EXECUTABLE, '-I', $temp-dir.Str, '-MNon::Existent::Module::Blah',
68+
:in, :out, :err
69+
);
70+
$proc.in.write: "say 'hello'\n".encode;
71+
$proc.in.close;
72+
like $proc.out.slurp-rest, /'rakudo-roast-RT127695-test'/,
73+
'-I in REPL works';
74+
}
75+

0 commit comments

Comments
 (0)