'color' => \$option_color,
'arch=s' => \$option_arch,
'buildd' => \$option_buildd,
- )) {
+ )
+ or scalar @ARGV == 0) {
require Pod::Usage;
Pod::Usage::pod2usage(2);
}
use strict;
use warnings;
-use Test::More tests => 110;
+use Test::More tests => 112;
sub is_blhc {
$file = "@{$file}";
}
- my $output = `./bin/blhc $options ./t/logs/$file 2>&1`;
+ $file = "./t/logs/$file" if $file;
+ my $output = `./bin/blhc $options $file 2>&1`;
if ($options) {
$options = ' '. $options;
# Usage.
-is_blhc 'empty', '--invalid', 2,
- 'Unknown option: invalid
-Usage:
+my $usage =
+ 'Usage:
blhc [*options*] *<dpkg-buildpackage build log file>..*
';
+is_blhc '', '--invalid', 2,
+ "Unknown option: invalid\n"
+ . $usage;
+is_blhc '', '', 2,
+ $usage;
# No compiler commands found.