blob: cb01196e8cfb6064a1f6768374c71bf833bfce2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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 };
|