Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use Test::More;
- use Test::Spawn;
- my $script = Test::Spawn->new(
- command => '/path/to/script/qmail/foo.pl',
- env => {DEFAULT => "TOKEN"},
- argv => [qw/--dump/],
- );
- $script->print_stdin($mail->body);
- $script->close_stdin();
- is $script->slurp_stdout(), '';
- is $script->slurp_stderr(), '';
- my $status = $script->wait;
- ok $status->is_exited();
- is $status->exit_status(), 0;
Add Comment
Please, Sign In to add comment