From 36fc8a8cef0f3cba576d7e9bb0d39c892a7281e2 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 3 Feb 2020 21:22:05 -0700 Subject: check toplevel is always absolute Signed-off-by: Sean Whitton --- t/10_init.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 't') 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"; } { -- cgit v1.2.3