From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

#!/usr/bin/env perl
use v5.12.5;
our $VERSION = '9999.99.99_99'; # VERSION
use English qw(-no_match_vars);
plan tests => 3;
subtest 'simple command output', sub {
my $output = run 'echo 1';
if ( $OSNAME eq 'MSWin32' ) {
$output =~ s/[ ]$//msx;
}
is( $output, 1, 'correct output' );
};
subtest 'command with arguments', sub {
my $output = run 'perl', [ '-e', 'print 1' ];
is( $output, 1, 'correct output with arguments' );
};