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 38 39
|
#!perl
use warnings;
use strict;
use Test::More tests => 4;
use App::Ack ();
use File::Next ();
use lib 't';
use Util;
prep_environment();
ACK_F: {
my @expected = qw(
t/etc/shebang.empty.xxx
t/swamp/moose-andy.jpg
);
my @files = qw( t );
my @args = qw( -f --binary );
my @results = run_ack( @args, @files );
sets_match( \@results, \@expected, 'Looking for binary' );
}
ACK_BINARY: {
my @expected = (
'Binary file t/swamp/moose-andy.jpg matches',
);
my @files = qw( t/swamp );
my @args = qw( -a sRGB );
my @results = run_ack( @args, @files );
lists_match( \@results, \@expected, 'Looking for binary' );
}
|