diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-02-03 21:22:05 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-02-03 21:22:05 -0700 |
commit | 36fc8a8cef0f3cba576d7e9bb0d39c892a7281e2 (patch) | |
tree | b39ead09e553b25e16ad4dee93d73a5fc00a991c | |
parent | ad60c0f67d30e658e785b0d9fc91880678c25b55 (diff) | |
download | p5-Git-Annex-36fc8a8cef0f3cba576d7e9bb0d39c892a7281e2.tar.gz |
check toplevel is always absolute
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rwxr-xr-x | t/10_init.t | 5 |
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"; } { |