]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/import.t
init: use Import::run_die instead of system()
[public-inbox.git] / t / import.t
index 2f5b08a522fb64f67cb67ffc80ffcf2c368c1560..cfbe501b102bca5061856ac52609529ed650c37e 100644 (file)
@@ -10,7 +10,7 @@ use PublicInbox::Spawn qw(spawn);
 use IO::File;
 use Fcntl qw(:DEFAULT);
 use File::Temp qw/tempfile/;
-require './t/common.perl';
+use PublicInbox::TestCommon;
 my ($dir, $for_destroy) = tmpdir();
 
 is(system(qw(git init -q --bare), $dir), 0, 'git init successful');
@@ -44,7 +44,7 @@ if ($v2) {
        $in->flush or die "flush failed: $!";
        $in->seek(0, SEEK_SET);
        my $out = tempfile();
-       my $pid = spawn(\@cmd, {}, { 0 => fileno($in), 1 => fileno($out)});
+       my $pid = spawn(\@cmd, {}, { 0 => $in, 1 => $out });
        is(waitpid($pid, 0), $pid, 'waitpid succeeds on hash-object');
        is($?, 0, 'hash-object');
        $out->seek(0, SEEK_SET);