diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-02-04 17:01:21 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-02-04 17:04:08 -0700 |
commit | cbcf3892e0850bfae538b25808397ef1acbc36cf (patch) | |
tree | 42e2a668cda242b9ece998f3f5c5cd0ede0b4b99 /t/11_utils.t | |
parent | f4bc5c4dbd713b78dec06a042fb26dd50594bc8a (diff) | |
download | p5-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>
Diffstat (limited to 't/11_utils.t')
-rwxr-xr-x | t/11_utils.t | 17 |
1 files changed, 9 insertions, 8 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"; } }; |