aboutsummaryrefslogtreecommitdiff
path: root/t/18-snap.t
diff options
context:
space:
mode:
authorSlack Coder <slackcoder@server.ky>2024-11-28 09:59:36 -0500
committerSlack Coder <slackcoder@server.ky>2025-02-19 09:55:01 -0500
commit24493e32d8548110c514db9bc09efb5aba276ca5 (patch)
tree80319bacf6eb845741beb8d331969884495d6f4c /t/18-snap.t
parent82a520dcb6f6cfe538c68fd04a8a7b94f3b177c2 (diff)
downloadsbotools2-24493e32d8548110c514db9bc09efb5aba276ca5.tar.xz
Set To Do branch
Diffstat (limited to 't/18-snap.t')
-rwxr-xr-xt/18-snap.t59
1 files changed, 0 insertions, 59 deletions
diff --git a/t/18-snap.t b/t/18-snap.t
deleted file mode 100755
index 2e028a1..0000000
--- a/t/18-snap.t
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/env perl
-
-use 5.16.0;
-use strict;
-use warnings FATAL => 'all';
-use Test::More;
-use Capture::Tiny qw/ capture_merged /;
-use FindBin '$RealBin';
-use lib $RealBin;
-use Test::Sbotools qw/ sbosnap set_gpg_verify set_repo set_sbo_home /;
-use File::Temp 'tempdir';
-
-plan tests => 4;
-
-my $usage = <<'SBOSNAP';
-Usage: sbosnap [options|command]
-
-Options:
- -h|--help:
- this screen.
- -v|--version:
- version information.
-
-Commands:
- fetch: initialize a local copy of the slackbuilds.org tree.
- import-key [path or url]: import GPG for verifying the slackbuilds.org tree. Defaults to the key shipped with sbotools2.
- update: update an existing local copy of the slackbuilds.org tree.
- (generally, you may prefer "sbocheck" over "sbosnap update")
-
-SBOSNAP
-
-# 1: sbosnap errors without arguments
-sbosnap { exit => 1, expected => $usage };
-
-# 2: sbosnap invalid errors
-sbosnap 'invalid', { exit => 1, expected => $usage };
-
-# 3: sbosnap update when /usr/sbo/repo is empty
-my $tmp = tempdir(CLEANUP => 1);
-set_gpg_verify('FALSE');
-set_repo("file://$tmp");
-capture_merged { system <<"END"; };
-cd $tmp
-git init
-mkdir test
-cp -a $RealBin/LO/nonexistentslackbuild test
-git add test
-git commit -m 'test'
-END
-
-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', { test => 0, note => 1 };
-note scalar `ls -R $tmphome`;
-ok (-e "$tmphome/repo/test/nonexistentslackbuild/nonexistentslackbuild.info", 'SBo tree pulled to correct location');