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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
#!perl
use warnings;
use strict;
use Test::More tests => 6;
use lib 't';
use Util;
prep_environment();
TRAILING_PUNC: {
my @expected = (
'And I said: "My name is Sue! How do you do! Now you gonna die!"',
'Bill or George! Anything but Sue! I still hate that name!',
);
my @files = qw( t/text );
my @args = qw( Sue! -w -h --text );
my @results = run_ack( @args, @files );
sets_match( \@results, \@expected, 'Looking for Sue!' );
}
TRAILING_METACHAR_BACKSLASH_W: {
my @expected = (
'At an old saloon on a street of mud,',
'Kicking and a-gouging in the mud and the blood and the beer.',
);
my @files = qw( t/text );
my @args = qw( mu\w -w -h --text );
my @results = run_ack( @args, @files );
sets_match( \@results, \@expected, 'Looking for mu\\w' );
}
TRAILING_METACHAR_DOT: {
local $TODO = q{I can't figure why the -w works from the command line, but not inside this test};
my @expected = (
'At an old saloon on a street of mud,',
'Kicking and a-gouging in the mud and the blood and the beer.',
);
my @files = qw( t/text );
my @args = ( 'mu.', qw( -w -h --text ) );
my @results = run_ack( @args, @files );
sets_match( \@results, \@expected, 'Looking for mu.' );
}
|