Guest User

Untitled

a guest
Jun 22nd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. use Test::More;
  2. use Test::Spawn;
  3.  
  4. my $script = Test::Spawn->new(
  5. command => '/path/to/script/qmail/foo.pl',
  6. env => {DEFAULT => "TOKEN"},
  7. argv => [qw/--dump/],
  8. );
  9. $script->print_stdin($mail->body);
  10. $script->close_stdin();
  11. is $script->slurp_stdout(), '';
  12. is $script->slurp_stderr(), '';
  13.  
  14. my $status = $script->wait;
  15. ok $status->is_exited();
  16. is $status->exit_status(), 0;
Add Comment
Please, Sign In to add comment