summaryrefslogtreecommitdiff
path: root/t/50-integration.t
blob: 12193238011e824fa5e5eab4fdfb08b11ec58a1d (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
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;
use autodie;

use Cwd;
use Test::Command tests => 6;

my $hashl = '../../bin/hashl';

my $EMPTY = q{};
my $usage = <<'EOF';
Usage: ../../bin/hashl [options] <update|list|info|...> [args]
See 'perldoc -F ../../bin/hashl' (or 'man hashl' if it is properly installed)
EOF

chdir('t/in');

for my $cmd ("$hashl", "$hashl copy") {
	my $tc = Test::Command->new(cmd => $cmd);

	$tc->exit_isnt_num(0);
	$tc->stdout_is_eq($EMPTY);
	$tc->stderr_is_eq($usage);
}