about summary refs log tree commit homepage
path: root/t/git.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-05-14 03:32:03 +0000
committerEric Wong <e@80x24.org>2019-05-14 04:00:10 +0000
commit2d51a2accd28465c915f91ab48c7e52a81d87a68 (patch)
tree06c8ca7d3d4cf015f5dc548438b859cd31cd29b9 /t/git.t
parent1f4b022c38faba208528d0d5c993d569682b2a09 (diff)
downloadpublic-inbox-2d51a2accd28465c915f91ab48c7e52a81d87a68.tar.gz
We only need it for tests that chdir, and maybe for ENV{PATH}
portability (dash seems fine, not sure about others).

v2: revert change to solver_git.t for FreeBSD 11.2 and document
Diffstat (limited to 't/git.t')
-rw-r--r--t/git.t5
1 files changed, 2 insertions, 3 deletions
diff --git a/t/git.t b/t/git.t
index 5b612b8e..7edf82b4 100644
--- a/t/git.t
+++ b/t/git.t
@@ -5,7 +5,6 @@ use warnings;
 use Test::More;
 use File::Temp qw/tempdir/;
 my $dir = tempdir('pi-git-XXXXXX', TMPDIR => 1, CLEANUP => 1);
-use Cwd qw/getcwd/;
 use PublicInbox::Spawn qw(popen_rd);
 
 eval { require IPC::Run } or plan skip_all => 'IPC::Run missing';
@@ -15,7 +14,7 @@ use_ok 'PublicInbox::Git';
         is(system(qw(git init -q --bare), $dir), 0, 'created git directory');
         my $cmd = [ 'git', "--git-dir=$dir", 'fast-import', '--quiet' ];
 
-        my $fi_data = getcwd().'/t/git.fast-import-data';
+        my $fi_data = './t/git.fast-import-data';
         ok(-r $fi_data, "fast-import data readable (or run test at top level)");
         IPC::Run::run($cmd, '<', $fi_data);
         is($?, 0, 'fast-import succeeded');
@@ -68,7 +67,7 @@ if (1) {
         my $cmd = [ 'git', "--git-dir=$dir", qw(hash-object -w --stdin) ];
 
         # need a big file, use the AGPL-3.0 :p
-        my $big_data = getcwd().'/COPYING';
+        my $big_data = './COPYING';
         ok(-r $big_data, 'COPYING readable');
         my $size = -s $big_data;
         ok($size > 8192, 'file is big enough');