summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-02-04 17:01:21 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-02-04 17:04:08 -0700
commitcbcf3892e0850bfae538b25808397ef1acbc36cf (patch)
tree42e2a668cda242b9ece998f3f5c5cd0ede0b4b99
parentf4bc5c4dbd713b78dec06a042fb26dd50594bc8a (diff)
downloadp5-Git-Annex-cbcf3892e0850bfae538b25808397ef1acbc36cf.tar.gz
use source2/other for abs_contentlocation test
baz is actually meant to be an unlocked file. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rwxr-xr-xt/11_utils.t17
-rw-r--r--t/lib/t/Setup.pm2
2 files changed, 10 insertions, 9 deletions
diff --git a/t/11_utils.t b/t/11_utils.t
index 1174109..3d3cb55 100755
--- a/t/11_utils.t
+++ b/t/11_utils.t
@@ -16,8 +16,9 @@ use File::chdir;
use File::Basename qw(basename);
with_temp_annexes {
- my $temp = shift;
- my $annex = Git::Annex->new("source1");
+ my $temp = shift;
+ my $annex = Git::Annex->new("source1");
+ my $annex2 = Git::Annex->new("source2");
my $unused_info = catfile($temp, qw(source1 .git annex unused_info));
is $annex->_git_path("blah", "foo"),
@@ -34,12 +35,12 @@ with_temp_annexes {
ok !-f $unused_info, "_clear_unused_cache deletes the cache";
{
- local $CWD = catfile qw(source1 foo foo2);
- my $contentlocation = realpath rel2abs readlink "baz";
- my $key = basename readlink "baz";
- is $annex->abs_contentlocation($key), $contentlocation,
- "it returns an absolute path to the content for foo/foo2/baz";
- is $annex->abs_contentlocation("foo"), undef,
+ local $CWD = "source2";
+ my $contentlocation = realpath rel2abs readlink "other";
+ my $key = basename readlink "other";
+ is $annex2->abs_contentlocation($key), $contentlocation,
+ "it returns an absolute path to the content for other";
+ is $annex2->abs_contentlocation("foo"), undef,
"it returns undef for a nonsense key";
}
};
diff --git a/t/lib/t/Setup.pm b/t/lib/t/Setup.pm
index 454fa22..94c3d7c 100644
--- a/t/lib/t/Setup.pm
+++ b/t/lib/t/Setup.pm
@@ -33,7 +33,7 @@ sub with_temp_annexes (&) {
mkdir catfile qw(source1 foo foo2);
write_file catfile(qw(source1 foo foo2 baz)), "baz\n";
$source1->RUN(qw(-c annex.gitaddtoannex=false add foo/bar));
- $source1->RUN(qw(-c annex.gitaddtoannex=false annex add foo/foo2/baz));
+ $source1->RUN(qw(-c annex.addunlocked=true annex add foo/foo2/baz));
$source1->commit({ message => "add" });
# source2 setup