App-a2p

 view release on metacpan or  search on metacpan

t/10-basics.t  view on Meta::CPAN

open my $self, '<', $0;
chomp(my @expected = grep { /awk2perl/ } <$self>);
is_deeply([ split /\n/, $output ], \@expected, 'Output is identical to … code');

done_testing;

sub run_command {
	my %args = @_;
	my @command = @{ $args{command} };
	my $pid = open2(my ($in, $out), @command) or die "Couldn't open2($?): $!";
	binmode $in, ':crlf' if $^O eq 'MSWin32';
	my $ret = do { local $/; <$in> };
	waitpid $pid, 0;
	return $ret;
}

sub runa2p {
	my %args = @_;
	my @command = catfile(qw{blib bin}, "a2p$Config{exe_ext}");
	push @command, @{ $args{args} } if $args{args};
	push @command, $args{progfile} if $args{progfile};



( run in 0.633 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )