diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-02-10 20:53:26 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-02-10 20:55:23 -0700 |
commit | d5003c566d49b2c43726dc0575dd934476e5f9a4 (patch) | |
tree | cc193a6cffd1a7ec469090c82f820e7ed53c6f4b /t/10_init.t | |
parent | 0e8636ba575c0125437d445d56bab18c393fb331 (diff) | |
download | p5-Git-Annex-d5003c566d49b2c43726dc0575dd934476e5f9a4.tar.gz |
skip most tests when git-annex not available
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 't/10_init.t')
-rwxr-xr-x | t/10_init.t | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/t/10_init.t b/t/10_init.t index 9e50a93..2ed4567 100755 --- a/t/10_init.t +++ b/t/10_init.t @@ -10,6 +10,7 @@ use Git::Annex; use File::chdir; use File::Temp qw(tempdir); use t::Setup; +use t::Util; use File::Spec::Functions qw(catfile file_name_is_absolute); { @@ -45,10 +46,13 @@ use File::Spec::Functions qw(catfile file_name_is_absolute); # "Git::Repository has correct toplevel"; # }; -with_temp_annexes { - my $source1_dir = catfile shift, "source1"; - my $annex = Git::Annex->new(catfile $source1_dir, "foo"); - is $annex->toplevel, $source1_dir, "it rises to top of working tree"; -}; +SKIP: { + skip "git-annex not available", 1 unless git_annex_available; + with_temp_annexes { + my $source1_dir = catfile shift, "source1"; + my $annex = Git::Annex->new(catfile $source1_dir, "foo"); + is $annex->toplevel, $source1_dir, "it rises to top of working tree"; + }; +} done_testing; |