aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-07-04 22:47:35 +0200
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2016-07-04 22:47:35 +0200
commit8ab0fe01e56a4a5ab4d3fb1f984a6006ab3d07ad (patch)
tree5db5aeace4530babea9bb4d4496b1f1d1e9daf27 /t
parent07015d885e82bd135710357356776d1d4bbea090 (diff)
downloadsbotools2-8ab0fe01e56a4a5ab4d3fb1f984a6006ab3d07ad.tar.xz
18-snap.t: Test SBO_HOME setting
Diffstat (limited to 't')
-rwxr-xr-xt/18-snap.t12
1 files changed, 9 insertions, 3 deletions
diff --git a/t/18-snap.t b/t/18-snap.t
index a355240..a2e6506 100755
--- a/t/18-snap.t
+++ b/t/18-snap.t
@@ -7,10 +7,10 @@ use Test::More;
use Capture::Tiny qw/ capture_merged /;
use FindBin '$RealBin';
use lib $RealBin;
-use Test::Sbotools qw/ sbosnap set_repo /;
+use Test::Sbotools qw/ sbosnap set_repo set_sbo_home /;
use File::Temp 'tempdir';
-plan tests => 3;
+plan tests => 4;
my $usage = <<'SBOSNAP';
Usage: sbosnap [options|command]
@@ -46,5 +46,11 @@ git add test
git commit -m 'test'
END
-sbosnap 'update', { expected => qr/Pulling SlackBuilds tree[.][.][.]/ };;
+sbosnap 'update', { expected => qr/Pulling SlackBuilds tree[.][.][.]/ };
+# 4-5: sbosnap when SBO_HOME is set
+my $tmphome = tempdir(CLEANUP => 1);
+set_sbo_home($tmphome);
+
+sbosnap 'fetch', { note => 1, test => 0 };
+ok (-e "$tmphome/test/nonexistentslackbuild/nonexistentslackbuild.info", 'SBo tree pulled to correct location');