File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ # !perl -T
2+
3+ use strict;
4+ use warnings;
5+ use lib ' t' ;
6+
7+ use Test::More tests => 4;
8+ use File::Temp;
9+ use Util;
10+
11+ prep_environment();
12+
13+ my $dir = File::Temp-> newdir;
14+ my $wd = getcwd_clean();
15+ chdir $dir -> dirname;
16+ write_file(' space-newline.txt' , " \n " );
17+ write_file(' space-newline-newline.txt' , " \n\n " );
18+
19+ my @results = run_ack(' -l' , ' $' , ' space-newline.txt' , ' space-newline-newline.txt' );
20+
21+ sets_match(\@results , [
22+ ' space-newline.txt' ,
23+ ' space-newline-newline.txt' ,
24+ ], ' both files should be in -l output' );
25+
26+ @results = run_ack(' -c' , ' $' , ' space-newline.txt' , ' space-newline-newline.txt' );
27+
28+ sets_match(\@results , [
29+ ' space-newline.txt:1' ,
30+ ' space-newline-newline.txt:1' ,
31+ ], ' both files should be in -c output with correct counts' );
32+
33+ chdir $wd ;
You can’t perform that action at this time.
0 commit comments