aboutsummaryrefslogtreecommitdiff
path: root/t/22-race.t
diff options
context:
space:
mode:
Diffstat (limited to 't/22-race.t')
-rwxr-xr-xt/22-race.t12
1 files changed, 7 insertions, 5 deletions
diff --git a/t/22-race.t b/t/22-race.t
index 8323a75..7ff39ca 100755
--- a/t/22-race.t
+++ b/t/22-race.t
@@ -58,13 +58,14 @@ SKIP: {
my $tempdir = tempdir(CLEANUP => 1);
my $repo = '/usr/sbo/repo';
+ system('mkdir', '-p', $repo);
system('mv', $repo, "$repo.bak");
capture_merged { system <<"GIT"; };
cd $tempdir
git init
- mkdir -p test/nonexistentslackbuild
- cp "$RealBin/nonexistentslackbuild/*" test/nonexistentslackbuild
+ mkdir -p test
+ cp -R "$RealBin/LO/nonexistentslackbuild" test
git add test
git commit -m 'added test/nonexistentslackbuild'
@@ -76,7 +77,8 @@ GIT
*_race::cond = sub { system('rm', '-rf', $repo) if $_[0] eq '$repo_path can be deleted after -d check' };
my $res;
- my $out = capture_merged { $res = SBO::Lib::git_sbo_tree("file://$tempdir"); };
+ my $out = capture_merged { $res = SBO::Lib::git_sbo_tree("file://$tempdir", ''); };
+ note($out);
is ($out, '', 'git_sbo_tree() no output');
is ($res, 0, 'git_sbo_tree() returned 0');
@@ -91,10 +93,10 @@ GIT
};
undef $res;
- $out = capture_merged { $res = SBO::Lib::git_sbo_tree("file://$tempdir"); };
+ $out = capture_merged { $res = SBO::Lib::git_sbo_tree("file://$tempdir", ''); };
- is ($res, 0, 'git_sbo_tree() returned 0');
is ($out, "fatal: not a git repository (or any of the parent directories): .git\n", 'git_sbo_tree() gave correct output');
+ is ($res, 0, 'git_sbo_tree() returned 0');
chdir $cwd;
system('rm', '-rf', $repo);