summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-02-03 21:22:05 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-02-03 21:22:05 -0700
commit36fc8a8cef0f3cba576d7e9bb0d39c892a7281e2 (patch)
treeb39ead09e553b25e16ad4dee93d73a5fc00a991c /t
parentad60c0f67d30e658e785b0d9fc91880678c25b55 (diff)
downloadp5-Git-Annex-36fc8a8cef0f3cba576d7e9bb0d39c892a7281e2.tar.gz
check toplevel is always absolute
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 't')
-rwxr-xr-xt/10_init.t5
1 files changed, 4 insertions, 1 deletions
diff --git a/t/10_init.t b/t/10_init.t
index f49fd20..2009f96 100755
--- a/t/10_init.t
+++ b/t/10_init.t
@@ -10,7 +10,7 @@ use Git::Annex;
use File::chdir;
use File::Temp qw(tempdir);
use t::Setup;
-use File::Spec::Functions qw(catfile);
+use File::Spec::Functions qw(catfile file_name_is_absolute);
{
my $temp = tempdir CLEANUP => 1;
@@ -19,6 +19,9 @@ use File::Spec::Functions qw(catfile);
local $CWD = $temp;
$annex = Git::Annex->new;
is $annex->toplevel, $temp, "constructor sets toplevel to pwd";
+ $annex = Git::Annex->new("foo");
+ ok file_name_is_absolute $annex->toplevel,
+ "it converts a relative path to absolute";
}
{