summaryrefslogtreecommitdiff
path: root/t/10_init.t
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-02-10 20:53:26 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-02-10 20:55:23 -0700
commitd5003c566d49b2c43726dc0575dd934476e5f9a4 (patch)
treecc193a6cffd1a7ec469090c82f820e7ed53c6f4b /t/10_init.t
parent0e8636ba575c0125437d445d56bab18c393fb331 (diff)
downloadp5-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-xt/10_init.t14
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;