]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/nulsubject.t
testcommon: spawn-aware system() and qx[] workalikes
[public-inbox.git] / t / nulsubject.t
index fec6c1aee441ab5ee278c9b6ab5939856b78385b..1ded88d31f435fdad0fa3d792e5079e96ca08ee1 100644 (file)
@@ -11,9 +11,9 @@ my ($tmpdir, $for_destroy) = tmpdir();
 my $git_dir = "$tmpdir/a.git";
 
 {
-       is(system(qw(git init -q --bare), $git_dir), 0, 'git init ok');
        my $git = PublicInbox::Git->new($git_dir);
        my $im = PublicInbox::Import->new($git, 'testbox', 'test@example');
+       $im->init_bare;
        $im->add(Email::MIME->create(
                header => [
                        From => 'a@example.com',
@@ -25,7 +25,8 @@ my $git_dir = "$tmpdir/a.git";
                body => "hello world\n",
        ));
        $im->done;
-       is(system(qw(git --git-dir), $git_dir, 'fsck', '--strict'), 0, 'git fsck ok');
+       is(xsys(qw(git --git-dir), $git_dir, 'fsck', '--strict'), 0,
+               'git fsck ok');
 }
 
 done_testing();