IO-Lambda
view release on metacpan or search on metacpan
t/14_spawn.t view on Meta::CPAN
plan tests => 2;
this lambda {
context "$^X -v";
spawn {
my ( $buf, $exitcode, $error) = @_;
return $buf;
}
};
ok( this-> wait =~ /This is perl/s, 'good spawn');
this lambda {
context "./nothere 2>&1";
spawn {
my ( $buf, $exitcode, $error) = @_;
return not defined($buf);
}
};
ok( this-> wait, 'bad spawn');
( run in 0.912 second using v1.01-cache-2.11-cpan-49f99fa48dc )