]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/solver_git.t
lei rediff: quiet warnings from Import and Eml
[public-inbox.git] / t / solver_git.t
index f5cc592c6a60822f641028c2c01df0718376c0ab..3c0b7f6524c67b7d78d17e99ad5e484581b33f3c 100644 (file)
@@ -7,7 +7,7 @@ use PublicInbox::TestCommon;
 use Cwd qw(abs_path);
 require_git(2.6);
 use PublicInbox::ContentHash qw(git_sha);
-use PublicInbox::Spawn qw(popen_rd which);
+use PublicInbox::Spawn qw(popen_rd);
 require_mods(qw(DBD::SQLite Search::Xapian Plack::Util));
 my $git_dir = xqx([qw(git rev-parse --git-dir)], undef, {2 => \(my $null)});
 $? == 0 or plan skip_all => "$0 must be run from a git working tree";
@@ -93,6 +93,7 @@ index 15ac20eb..771486c4
 EOM
        like($lei_out, qr/\Q$exp\E/,
                'preserve mode, regen header + context from -U0 patch');
+       is($lei_err, '', 'no warnings from bare patch');
        my $e = { GIT_DIR => "$ENV{HOME}/.local/share/lei/store/ALL.git" };
        my @x = xqx([qw(git cat-file --batch-all-objects --batch-check)], $e);
        is_deeply(\@x, [], 'no objects stored') or diag explain(\@x);
@@ -270,7 +271,7 @@ EOF
                my $url = "http://$h:$p";
                local $ENV{PLACK_TEST_EXTERNALSERVER_URI} = $url;
                Plack::Test::ExternalServer::test_psgi(client => $client);
-               skip 'no curl', 1 unless which('curl');
+               require_cmd('curl', 1) or skip 'no curl', 1;
 
                mkdir "$tmpdir/ext" // xbail "mkdir $!";
                test_lei({tmpdir => "$tmpdir/ext"}, sub {