package Test::CLI; use Modern::Perl; use IPC::Run qw(run timeout); use Test::More; use base qw(Exporter); our @EXPORT_OK = qw( run_output_is ); our $TIMEOUT = 10; sub run_output_is { my ($expected, $command, $input, $diagnostic) = @_; my ($out, $err); run $command, \$input, \$out, \$err, timeout($TIMEOUT); is $expected, $out, $diagnostic; } 1; #### use Modern::Perl; use Test::CLI qw(run_output_is); use Test::More tests => 1; my @command = qw(parrot code/example-01-06.pir); my $in =<