diff options
Diffstat (limited to 't/18-snap.t')
-rwxr-xr-x | t/18-snap.t | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/t/18-snap.t b/t/18-snap.t new file mode 100755 index 0000000..cb01196 --- /dev/null +++ b/t/18-snap.t @@ -0,0 +1,37 @@ +#!/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 lib "$RealBin/../SBO-Lib/lib"; +use Test::Sbotools qw/ sbosnap /; +use SBO::Lib 'open_fh'; + +plan tests => 2; + +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. + 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 }; + |