- ok($tmp->sysseek(0, SEEK_SET) &&
- $tmp->truncate(0) &&
- $tmp->print($mime->as_string) &&
- $tmp->flush &&
- $tmp->sysseek(0, SEEK_SET),
- 'rewound and rewrite temporary file');
- my $cmd = ['public-inbox-mda'];
- ok(PublicInbox::Import::run_die($cmd, undef, $rdr),
- 'mda did not die on "spam"');
+ $rdr->{0} = \($mime->as_string);
+ ok(run_script(['-mda'], undef, $rdr), 'mda did not die on "spam"');