@ 11d698f

171210.1 · 9e1728b5eb0e01fb5f37539547aaf95de12142ee

Convert all t/text songs to public domain texts

reading declarations

MANIFEST

@@ -217,14 +217,14 @@ t/swamp/service.svc t/swamp/solution8.tar t/swamp/stuff.cmake t/swamp/swamp/ignoreme.txt-t/text/4th-of-july.txt-t/text/boy-named-sue.txt-t/text/freedom-of-choice.txt-t/text/me-and-bobbie-mcgee.txt+t/text/amontillado.txt+t/text/bill-of-rights.txt+t/text/constitution.txt+t/text/gettysburg.txt t/text/number.txt t/text/numbered-text.txt-t/text/science-of-myth.txt-t/text/shut-up-be-happy.txt+t/text/ozymandias.txt+t/text/raven.txt  xt/coding-standards.t xt/coresubs.t

t/ack-1.t

@@ -12,24 +12,24 @@ prep_environment();  SINGLE_TEXT_MATCH: {     my @expected = (-        'Was before he left, he went and named me Sue.'+        'the catacombs of the Montresors.'     );      my @files = qw( t/text );-    my @args = qw( Sue -1 -h --sort-files );+    my @args = qw( Montresor -1 -h --sort-files );     my @results = run_ack( @args, @files ); -    lists_match( \@results, \@expected, 'Looking for first instance of Sue!' );+    lists_match( \@results, \@expected, 'Looking for first instance of Montresor!' ); }   DASH_V: {     my @expected = (-        'Well, my daddy left home when I was three',+        '    Only this and nothing more."'     ); -    my @files = qw( t/text/boy-named-sue.txt );-    my @args = qw( Sue -1 -h -v );+    my @files = qw( t/text/raven.txt );+    my @args = qw( c -1 -h -v );     my @results = run_ack( @args, @files );      lists_match( \@results, \@expected, 'Looking for first non-match' );@@ -61,7 +61,7 @@ DASH_L: {     my @files    = reslash( 't/text' );     my @args     = qw( -1 -l --sort-files the );   # --sort-files to make sure we get the same first file each time.     my @results  = run_ack( @args, @files );-    my $expected = reslash( 't/text/4th-of-july.txt' );+    my $expected = reslash( 't/text/amontillado.txt' );      is_deeply( \@results, [$expected], 'Should only get one matching file back' ); }

t/ack-c.t

@@ -12,24 +12,24 @@ prep_environment();  DASH_L: {     my @expected = qw(-        t/text/science-of-myth.txt+        t/text/amontillado.txt+        t/text/gettysburg.txt+        t/text/raven.txt     ); -    my @args  = qw( religion -i -l --sort-files );+    my @args  = qw( God -i -l --sort-files );     my @files = qw( t/text ); -    ack_sets_match( [ @args, @files ], \@expected, 'Looking for religion with -l' );+    ack_sets_match( [ @args, @files ], \@expected, 'Looking for God with -l' ); }  DASH_CAPITAL_L: {     my @expected = qw(-        t/text/4th-of-july.txt-        t/text/boy-named-sue.txt-        t/text/me-and-bobbie-mcgee.txt+        t/text/bill-of-rights.txt+        t/text/constitution.txt         t/text/number.txt         t/text/numbered-text.txt-        t/text/freedom-of-choice.txt-        t/text/shut-up-be-happy.txt+        t/text/ozymandias.txt     );      my @switches = (@@ -39,22 +39,22 @@ DASH_CAPITAL_L: {      for my $switches ( @switches ) {         my @files = qw( t/text );-        my @args  = ( 'religion', @{$switches}, '--sort-files' );+        my @args  = ( 'God', @{$switches}, '--sort-files' ); -        ack_sets_match( [ @args, @files ], \@expected, "Looking for religion with @{$switches}" );+        ack_sets_match( [ @args, @files ], \@expected, "Looking for God with @{$switches}" );     } }  DASH_LV: {     my @expected = qw(-        t/text/4th-of-july.txt-        t/text/boy-named-sue.txt-        t/text/me-and-bobbie-mcgee.txt+        t/text/amontillado.txt+        t/text/bill-of-rights.txt+        t/text/constitution.txt+        t/text/gettysburg.txt         t/text/number.txt         t/text/numbered-text.txt-        t/text/freedom-of-choice.txt-        t/text/science-of-myth.txt-        t/text/shut-up-be-happy.txt+        t/text/ozymandias.txt+        t/text/raven.txt     );     my @switches = (         ['-l','-v'],@@ -67,49 +67,50 @@ DASH_LV: {         my @files = qw( t/text );         my @args  = ( 'religion', @{$switches}, '--sort-files' ); -        ack_sets_match( [ @args, @files ], \@expected, '-l -v will mostly likely match all input files' );+        ack_sets_match( [ @args, @files ], \@expected, '-l -v will match all input files because "religion" will not be on every line' );     } }  DASH_C: {     my @expected = qw(-        t/text/4th-of-july.txt:1-        t/text/boy-named-sue.txt:2-        t/text/freedom-of-choice.txt:0-        t/text/me-and-bobbie-mcgee.txt:0+        t/text/amontillado.txt:2+        t/text/bill-of-rights.txt:0+        t/text/constitution.txt:0+        t/text/gettysburg.txt:1         t/text/number.txt:0         t/text/numbered-text.txt:0-        t/text/science-of-myth.txt:0-        t/text/shut-up-be-happy.txt:0+        t/text/ozymandias.txt:0+        t/text/raven.txt:2     ); -    my @args  = qw( boy -i -c --sort-files );+    my @args  = qw( God -c --sort-files );     my @files = qw( t/text ); -    ack_sets_match( [ @args, @files ], \@expected, 'Boy counts' );+    ack_sets_match( [ @args, @files ], \@expected, 'God counts' ); }  DASH_LC: {     my @expected = qw(-        t/text/science-of-myth.txt:2+        t/text/bill-of-rights.txt:1+        t/text/constitution.txt:29     ); -    my @args  = qw( religion -i -l -c --sort-files );+    my @args  = qw( congress -i -l -c --sort-files );     my @files = qw( t/text ); -    ack_sets_match( [ @args, @files ], \@expected, 'Religion counts -l -c' );+    ack_sets_match( [ @args, @files ], \@expected, 'congress counts with -l -c' ); }  PIPE_INTO_C: {-    my $file    = 't/text/science-of-myth.txt';-    my @args    = qw( religion -i -c );+    my $file = 't/text/raven.txt';+    my @args = qw( nevermore -i -c );     my @results = pipe_into_ack( $file, @args ); -    is_deeply( \@results, [2], 'Piping into ack --count should return one line of results' );+    is_deeply( \@results, [ 11 ], 'Piping into ack --count should return one line of results' ); }  DASH_HC: {-    my @args     = qw( boy -i -c -h );+    my @args     = qw( Montresor -c -h );     my @files    = qw( t/text );     my @expected = ( '3' ); @@ -117,9 +118,9 @@ DASH_HC: { }  SINGLE_FILE_COUNT: {-    my @args     = qw( boy -i -c -h );-    my @files    = ( 't/text/boy-named-sue.txt' );-    my @expected = ( '2' );+    my @args     = qw( Montresor -c -h );+    my @files    = ( 't/text/amontillado.txt' );+    my @expected = ( '3' );      ack_sets_match( [ @args, @files ], \@expected, 'ack -c -h should return one line of results' ); }

t/ack-color.t

@@ -8,7 +8,7 @@ use Test::More; use lib 't'; use Util; -plan tests => 12;+plan tests => 13;  prep_environment(); @@ -23,16 +23,16 @@ my $yellow_start = "\e[1;33m"; my $yellow_end   = "\e[0m";  NORMAL_COLOR: {-    my @files = qw( t/text/boy-named-sue.txt );-    my @args = qw( called --color );+    my @files = qw( t/text/bill-of-rights.txt );+    my @args = qw( free --color );     my @results = run_ack( @args, @files );      ok( grep { /\e/ } @results, 'normal match highlighted' ) or diag(explain(\@results)); }  MATCH_WITH_BACKREF: {-    my @files = qw( t/text/boy-named-sue.txt );-    my @args = qw( (called).*\1 --color );+    my @files = qw( t/text/bill-of-rights.txt );+    my @args = qw( (free).*\1 --color );     my @results = run_ack( @args, @files );      is( @results, 1, 'backref pattern matches once' );@@ -41,59 +41,75 @@ MATCH_WITH_BACKREF: { }  BRITISH_COLOR: {-    my @files = qw( t/text/boy-named-sue.txt );-    my @args = qw( called --colour );+    my @files = qw( t/text/bill-of-rights.txt );+    my @args = qw( free --colour );     my @results = run_ack( @args, @files );      ok( grep { /\e/ } @results, 'normal match highlighted' ); }  MULTIPLE_MATCHES: {-    my @files = qw( t/text/freedom-of-choice.txt );-    my @args = qw( v.+?m|c.+?n -w --color );+    my @files = qw( t/text/amontillado.txt );+    my @args = qw( az.+?e|ser.+?nt -w --color );     my @results = run_ack( @args, @files ); -    is( @results, 1, 'multiple matches on 1 line' );-    is( $results[0], "A ${match_start}victim${match_end} of ${match_start}collision${match_end} on the open sea$line_end",-        'multiple matches highlighted' );+    is_deeply( \@results, [+        "\"A huge human foot d'or, in a field ${match_start}azure${match_end}; the foot crushes a ${match_start}serpent${match_end}$line_end",+    ] );+}+++ADJACENT_CAPTURE_COLORING: {+    my @files = qw( t/text/raven.txt );+    my @args = qw( (Temp)(ter) --color );+    my @results = run_ack( @args, @files );++    # The double end + start is kinda weird; this test could probably be more robust.+    is_deeply( \@results, [+        "Whether ${match_start}Tempter${match_end} sent, or whether tempest tossed thee here ashore,$line_end",+    ] ); }   subtest 'Heading colors, single line' => sub {-    plan tests => 6;+    plan tests => 4;      # Without the column number-    my $file = reslash( 't/text/science-of-myth.txt' );-    my @args = qw( mutually -w --color -H );+    my $file = reslash( 't/text/ozymandias.txt' );+    my @args = qw( mighty -i -w --color -H );     my @results = run_ack( @args, $file ); -    is( $results[0], "${green_start}$file${green_end}:${yellow_start}13${yellow_end}:Science and religion are not ${match_start}mutually${match_end} exclusive$line_end", 'Properly row highlights' );-    is( scalar @results, 1, 'Only one line back' );+    is_deeply( \@results, [+        "${green_start}$file${green_end}:${yellow_start}11${yellow_end}:Look on my works, ye ${match_start}Mighty${match_end}, and despair!'$line_end",+    ] );      # With column number     @results = run_ack( @args, '--column', $file );-    is( $results[0], "${green_start}$file${green_end}:${yellow_start}13${yellow_end}:${yellow_start}30${yellow_end}:Science and religion are not ${match_start}mutually${match_end} exclusive$line_end", 'Properly row highlights' );-    is( scalar @results, 1, 'Only one line back' );+    is_deeply( \@results, [+        "${green_start}$file${green_end}:${yellow_start}11${yellow_end}:${yellow_start}22${yellow_end}:Look on my works, ye ${match_start}Mighty${match_end}, and despair!'$line_end",+    ] ); };   subtest 'Heading colors, grouped' => sub {-    plan tests => 8;+    plan tests => 4;      # Without the column number-    my $file = reslash( 't/text/science-of-myth.txt' );-    my @args = qw( mutually -w --color --group );+    my $file = reslash( 't/text/ozymandias.txt' );+    my @args = qw( mighty -i -w --color --group );     my @results = run_ack( @args, 't/text' ); -    is( $results[0], "${green_start}$file${green_end}", 'Heading is right' );-    is( $results[1], "${yellow_start}13${yellow_end}:Science and religion are not ${match_start}mutually${match_end} exclusive$line_end", 'Match line OK' );-    is( scalar @results, 2, 'Exactly two lines' );+    is_deeply( \@results, [+        "${green_start}$file${green_end}",+        "${yellow_start}11${yellow_end}:Look on my works, ye ${match_start}Mighty${match_end}, and despair!'$line_end",+    ] );      # With column number     @results = run_ack( @args, '--column', 't/text' );-    is( $results[0], "${green_start}$file${green_end}", 'Heading is right' );-    is( $results[1], "${yellow_start}13${yellow_end}:${yellow_start}30${yellow_end}:Science and religion are not ${match_start}mutually${match_end} exclusive$line_end", 'Match line OK' );-    is( scalar @results, 2, 'Exactly two lines' );+    is_deeply( \@results, [+        "${green_start}$file${green_end}",+        "${yellow_start}11${yellow_end}:${yellow_start}22${yellow_end}:Look on my works, ye ${match_start}Mighty${match_end}, and despair!'$line_end",+    ] ); };  done_testing();

t/ack-column.t

@@ -11,27 +11,26 @@ use Util;  prep_environment(); -my $weasel = reslash( 't/text/science-of-myth.txt' );-my @base_args = qw( the -w -i --with-filename --noenv );+my $raven = reslash( 't/text/raven.txt' );+my @base_args = qw( nevermore -w -i --with-filename --noenv );  WITH_COLUMNS: {     my @expected = line_split( <<'HERE' );-3:4:In the case of Christianity and Judaism there exists the belief-6:1:The Buddhists believe that the functional aspects override the myth-7:27:While other religions use the literal core to build foundations with-8:11:See, half the world sees the myth as fact, and it's seen as a lie by the other half-9:5:And the simple truth is that it's none of that 'cause-10:24:Somehow no matter what the world keeps turning-14:43:In fact, for better understanding we take the facts of science and apply them-16:17:But closing off the possibilities makes it hard to see the bigger picture-18:10:Consider the case of the woman whose faith helped her make it through-22:31:And if it works, then it gets the job done-23:24:Somehow no matter what the world keeps turning-26:9:    -- "The Science Of Myth", Screeching Weasel+55:23:    Quoth the Raven, "Nevermore."+62:24:    With such name as "Nevermore."+69:26:    Then the bird said, "Nevermore."+76:18:    Of 'Never -- nevermore.'+83:24:    Meant in croaking "Nevermore."+90:26:    She shall press, ah, nevermore!+97:23:    Quoth the Raven, "Nevermore."+104:23:    Quoth the Raven, "Nevermore."+111:23:    Quoth the Raven, "Nevermore."+118:23:    Quoth the Raven, "Nevermore."+125:22:    Shall be lifted--nevermore! HERE-    @expected = map { "${weasel}:$_" } @expected;+    @expected = map { "${raven}:$_" } @expected; -    my @files = ( $weasel );+    my @files = ( $raven );     my @args = ( @base_args, '--column' );     my @results = run_ack( @args, @files ); @@ -41,22 +40,21 @@ HERE  WITHOUT_COLUMNS: {     my @expected = line_split( <<'HERE' );-3:In the case of Christianity and Judaism there exists the belief-6:The Buddhists believe that the functional aspects override the myth-7:While other religions use the literal core to build foundations with-8:See, half the world sees the myth as fact, and it's seen as a lie by the other half-9:And the simple truth is that it's none of that 'cause-10:Somehow no matter what the world keeps turning-14:In fact, for better understanding we take the facts of science and apply them-16:But closing off the possibilities makes it hard to see the bigger picture-18:Consider the case of the woman whose faith helped her make it through-22:And if it works, then it gets the job done-23:Somehow no matter what the world keeps turning-26:    -- "The Science Of Myth", Screeching Weasel+55:    Quoth the Raven, "Nevermore."+62:    With such name as "Nevermore."+69:    Then the bird said, "Nevermore."+76:    Of 'Never -- nevermore.'+83:    Meant in croaking "Nevermore."+90:    She shall press, ah, nevermore!+97:    Quoth the Raven, "Nevermore."+104:    Quoth the Raven, "Nevermore."+111:    Quoth the Raven, "Nevermore."+118:    Quoth the Raven, "Nevermore."+125:    Shall be lifted--nevermore! HERE-    @expected = map { "${weasel}:$_" } @expected;+    @expected = map { "${raven}:$_" } @expected; -    my @files = ( $weasel );+    my @files = ( $raven );     my @args = ( @base_args, '--no-column' );     my @results = run_ack( @args, @files ); 

t/ack-g.t

@@ -171,51 +171,28 @@ subtest 'File on command line is always searched, even with wrong filetype' => s   subtest '-Q works on -g' => sub {-    plan tests => 2;+    plan tests => 1; -    my @expected = qw(-    );+    my @expected = qw();     my $regex = 'ack-g.t$';      my @files = qw( t );     my @args  = ( '-Q', '-g', $regex );      ack_sets_match( [ @args, @files ], \@expected, "Looking for $regex with quotemeta." );--    @expected = (-        't/text/4th-of-july.txt',-        't/text/freedom-of-choice.txt',-        't/text/science-of-myth.txt',-    );-    $regex = 'of';--    @files = qw( t/text );-    @args  = ( '-Q', '-g', $regex, '--sort-files' );--    ack_sets_match( [ @args, @files ], \@expected, "Looking for $regex with quotemeta." ); };   subtest '-w works on -g' => sub {-    plan tests => 2;--    my @expected = qw();-    my $regex = 'free';--    my @args  = ( '-w', '-g', $regex, '--sort-files' ); # The -w means "free" won't match "freedom"-    my @files = qw( t/text/ );--    ack_sets_match( [ @args, @files ], \@expected, "Looking for $regex with '-w'." );+    plan tests => 1; -    @expected = (-        't/text/4th-of-july.txt',-        't/text/freedom-of-choice.txt',-        't/text/science-of-myth.txt',+    my @expected = qw(+        t/text/number.txt     );-    $regex = 'of';+    my $regex = 'number';  # "number" shouldn't match "numbered" -    @files = qw( t/text );-    @args  = ( '-w', '-g', $regex, '--sort-files' );+    my @files = qw( t/text );+    my @args  = ( '-w', '-g', $regex, '--sort-files' );      ack_sets_match( [ @args, @files ], \@expected, "Looking for $regex with '-w'." ); };@@ -225,13 +202,10 @@ subtest '-v works on -g' => sub {     plan tests => 1;      my @expected = qw(-        t/text/boy-named-sue.txt-        t/text/me-and-bobbie-mcgee.txt-        t/text/number.txt-        t/text/numbered-text.txt-        t/text/shut-up-be-happy.txt+        t/text/bill-of-rights.txt+        t/text/gettysburg.txt     );-    my $file_regex = 'of';+    my $file_regex = 'n';      my @args  = ( '-v', '-g', $file_regex, '--sort-files' );     my @files = qw( t/text/ );@@ -271,7 +245,7 @@ subtest 'test exit codes' => sub {     run_ack( '-g', $file_regex, @files );     is( get_rc(), 1, '-g with no matches must exit with 1' ); -    $file_regex = 'boy';+    $file_regex = 'raven';      run_ack( '-g', $file_regex, @files );     is( get_rc(), 0, '-g with matches must exit with 0' );@@ -282,16 +256,16 @@ subtest 'test -g on a path' => sub {     plan tests => 1;      my $file_regex = 'text';-    my @expected   = (-        't/context.t',-        't/text/4th-of-july.txt',-        't/text/boy-named-sue.txt',-        't/text/freedom-of-choice.txt',-        't/text/me-and-bobbie-mcgee.txt',-        't/text/number.txt',-        't/text/numbered-text.txt',-        't/text/science-of-myth.txt',-        't/text/shut-up-be-happy.txt',+    my @expected   = qw(+        t/context.t+        t/text/amontillado.txt+        t/text/bill-of-rights.txt+        t/text/constitution.txt+        t/text/gettysburg.txt+        t/text/number.txt+        t/text/numbered-text.txt+        t/text/ozymandias.txt+        t/text/raven.txt     );     my @args = ( '--sort-files', '-g', $file_regex ); @@ -305,14 +279,14 @@ subtest 'test -g with --color' => sub {     my $file_regex = 'text';     my $expected_original = <<'END_COLOR'; t/con(text).t-t/(text)/4th-of-july.txt-t/(text)/boy-named-sue.txt-t/(text)/freedom-of-choice.txt-t/(text)/me-and-bobbie-mcgee.txt+t/(text)/amontillado.txt+t/(text)/bill-of-rights.txt+t/(text)/constitution.txt+t/(text)/gettysburg.txt t/(text)/number.txt t/(text)/numbered-(text).txt-t/(text)/science-of-myth.txt-t/(text)/shut-up-be-happy.txt+t/(text)/ozymandias.txt+t/(text)/raven.txt END_COLOR      $expected_original = windows_slashify( $expected_original ) if is_windows;@@ -338,14 +312,14 @@ subtest q{test -g without --color; make sure colors don't show} => sub {     my $file_regex = 'text';     my $expected   = <<'END_OUTPUT'; t/context.t-t/text/4th-of-july.txt-t/text/boy-named-sue.txt-t/text/freedom-of-choice.txt-t/text/me-and-bobbie-mcgee.txt+t/text/amontillado.txt+t/text/bill-of-rights.txt+t/text/constitution.txt+t/text/gettysburg.txt t/text/number.txt t/text/numbered-text.txt-t/text/science-of-myth.txt-t/text/shut-up-be-happy.txt+t/text/ozymandias.txt+t/text/raven.txt END_OUTPUT      my @args = ( '--sort-files', '-g', $file_regex );

t/ack-group.t

@@ -10,23 +10,17 @@ use Util;  prep_environment(); -my $freedom = reslash( 't/text/freedom-of-choice.txt' );-my $bobbie  = reslash( 't/text/me-and-bobbie-mcgee.txt' );+my ($bill_, $const, $getty) = map { reslash( "t/text/$_" ) } qw( bill-of-rights.txt constitution.txt gettysburg.txt );  my @TEXT_FILES = sort map { untaint($_) } glob( 't/text/*.txt' );   NO_GROUPING: {     my @expected = line_split( <<"EOF" );-$freedom:2:Nobody ever said life was free-$freedom:4:But use your freedom of choice-$freedom:6:I'll say it again in the land of the free-$freedom:7:Use your freedom of choice-$freedom:8:Your freedom of choice-$freedom:28:I'll say it again in the land of the free-$freedom:29:Use your freedom of choice-$bobbie:12:    Nothin' don't mean nothin' if it ain't free-$bobbie:27:    Nothin' don't mean nothin' if it ain't free+$bill_:4:or prohibiting the free exercise thereof; or abridging the freedom of+$bill_:10:A well regulated Militia, being necessary to the security of a free State,+$const:32:Number of free Persons, including those bound to Service for a Term+$getty:23:shall have a new birth of freedom -- and that government of the people, EOF      my @cases = (@@ -42,18 +36,15 @@ EOF  STANDARD_GROUPING: {     my @expected = line_split( <<"EOF" );-$freedom-2:Nobody ever said life was free-4:But use your freedom of choice-6:I'll say it again in the land of the free-7:Use your freedom of choice-8:Your freedom of choice-28:I'll say it again in the land of the free-29:Use your freedom of choice--$bobbie-12:    Nothin' don't mean nothin' if it ain't free-27:    Nothin' don't mean nothin' if it ain't free+$bill_+4:or prohibiting the free exercise thereof; or abridging the freedom of+10:A well regulated Militia, being necessary to the security of a free State,++$const+32:Number of free Persons, including those bound to Service for a Term++$getty+23:shall have a new birth of freedom -- and that government of the people, EOF      my @cases = (@@ -68,17 +59,13 @@ EOF  HEADING_NO_BREAK: {     my @expected = line_split( <<"EOF" );-$freedom-2:Nobody ever said life was free-4:But use your freedom of choice-6:I'll say it again in the land of the free-7:Use your freedom of choice-8:Your freedom of choice-28:I'll say it again in the land of the free-29:Use your freedom of choice-$bobbie-12:    Nothin' don't mean nothin' if it ain't free-27:    Nothin' don't mean nothin' if it ain't free+$bill_+4:or prohibiting the free exercise thereof; or abridging the freedom of+10:A well regulated Militia, being necessary to the security of a free State,+$const+32:Number of free Persons, including those bound to Service for a Term+$getty+23:shall have a new birth of freedom -- and that government of the people, EOF      my @arg_sets = (@@ -92,16 +79,12 @@ EOF  BREAK_NO_HEADING: {     my @expected = line_split( <<"EOF" );-$freedom:2:Nobody ever said life was free-$freedom:4:But use your freedom of choice-$freedom:6:I'll say it again in the land of the free-$freedom:7:Use your freedom of choice-$freedom:8:Your freedom of choice-$freedom:28:I'll say it again in the land of the free-$freedom:29:Use your freedom of choice--$bobbie:12:    Nothin' don't mean nothin' if it ain't free-$bobbie:27:    Nothin' don't mean nothin' if it ain't free+$bill_:4:or prohibiting the free exercise thereof; or abridging the freedom of+$bill_:10:A well regulated Militia, being necessary to the security of a free State,++$const:32:Number of free Persons, including those bound to Service for a Term++$getty:23:shall have a new birth of freedom -- and that government of the people, EOF      my @arg_sets = (

t/ack-line.t

@@ -13,82 +13,73 @@ if ( not has_io_pty() ) {     exit(0); } -plan tests => 14;+plan tests => 13;  prep_environment(); -LINE_1: {-    my @expected = (-        'Well, my daddy left home when I was three',-    );--    my @files = qw( t/text/boy-named-sue.txt );-    my @args = qw( --lines=1 );--    ack_sets_match( [ @args, @files ], \@expected, 'Looking for line 1' );-}--LINE_1_AND_5: {-    my @expected = (-        'Well, my daddy left home when I was three',-        'But the meanest thing that he ever did',-    );+LINE_6_AND_3: {+    my @expected = line_split( <<'EOF' );+and to petition the Government for a redress of grievances.+Congress shall make no law respecting an establishment of religion,+EOF -    my @files = qw( t/text/boy-named-sue.txt );-    my @args = qw( --lines=1 --lines=5 );+    my @files = qw( t/text/bill-of-rights.txt );+    my @args = qw( --lines=6 --lines=3 );      ack_sets_match( [ @args, @files ], \@expected, 'Looking for lines 1 and 5' ); } -LINE_1_COMMA_5: {-    my @expected = (-        'Well, my daddy left home when I was three',-        'But the meanest thing that he ever did',-    );+LINES_WITH_A_COMMA: {+    my @expected = line_split( <<'EOF' );+Congress shall make no law respecting an establishment of religion,+and to petition the Government for a redress of grievances.+EOF -    my @files = qw( t/text/boy-named-sue.txt );-    my @args = ( '--lines=1,5' );+    my @files = qw( t/text/bill-of-rights.txt );+    my @args = ( '--lines=3,6' ); -    ack_sets_match( [ @args, @files ], \@expected, 'Looking for lines 1, 5' );+    ack_sets_match( [ @args, @files ], \@expected, 'Looking for lines with a comma' ); } -LINES_2_TO_5: {+LINES_WITH_A_RANGE: {     my @expected = line_split( <<'EOF' );-And he didn't leave very much for my Ma and me-'cept an old guitar and an empty bottle of booze.-Now, I don't blame him 'cause he run and hid-But the meanest thing that he ever did+Congress shall make no law respecting an establishment of religion,+or prohibiting the free exercise thereof; or abridging the freedom of+speech, or of the press; or the right of the people peaceably to assemble,+and to petition the Government for a redress of grievances. EOF -    my @files = qw( t/text/boy-named-sue.txt );-    my @args = qw( --lines=2-5 );+    my @files = qw( t/text/bill-of-rights.txt );+    my @args = qw( --lines=3-6 ); -    ack_sets_match( [ @args, @files ], \@expected, 'Looking for lines 2 to 5' );+    ack_sets_match( [ @args, @files ], \@expected, 'Looking for lines 3 to 6' ); } -LINE_1_TO_5_CONTEXT: {+LINES_WITH_CONTEXT: {     my @expected = line_split( <<'EOF' );-Well, my daddy left home when I was three-And he didn't leave very much for my Ma and me-'cept an old guitar and an empty bottle of booze.-Now, I don't blame him 'cause he run and hid-But the meanest thing that he ever did+of that House shall agree to pass the Bill, it shall be sent, together+with the Objections, to the other House, by which it shall likewise be+reconsidered, and if approved by two thirds of that House, it shall become+a Law. But in all such Cases the Votes of both Houses shall be determined+by Yeas and Nays, and the Names of the Persons voting for and against+the Bill shall be entered on the Journal of each House respectively. If+any Bill shall not be returned by the President within ten Days (Sundays EOF -    my @files = qw( t/text/boy-named-sue.txt );-    my @args = qw( --lines=3 -C );+    my @files = qw( t/text/constitution.txt );+    my @args = qw( --lines=156 -C3 );      ack_lists_match( [ @files, @args ], \@expected, 'Looking for line 3 with two lines of context' ); } -LINE_1_AND_5_AND_NON_EXISTENT: {-    my @expected = (-        'Well, my daddy left home when I was three',-        'But the meanest thing that he ever did',-    );+LINES_THAT_MAY_BE_NON_EXISTENT: {+    my @expected = line_split( <<'EOF' );+"For the love of God, Montresor!"+"A mason," I replied.+EOF -    my @files = qw( t/text/boy-named-sue.txt );-    my @args = ( '--lines=1,5,1000' );+    my @files = qw( t/text/amontillado.txt );+    my @args = ( '--lines=309,200,1000' );      ack_sets_match( [ @args, @files ], \@expected, 'Looking for non existent line' ); }

t/ack-m.t

@@ -15,36 +15,37 @@ my @text  = sort map { untaint($_) } glob( 't/text/s*.txt' ); subtest 'Basic -m' => sub {     plan tests => 2; -    my $myth  = reslash( 't/text/science-of-myth.txt' );-    my $happy = reslash( 't/text/shut-up-be-happy.txt' );--    my @expected = line_split( <<"EOF" );-$myth:3:In the case of Christianity and Judaism there exists the belief-$myth:6:The Buddhists believe that the functional aspects override the myth-$myth:7:While other religions use the literal core to build foundations with-$happy:10:Anyone caught outside the gates of their subdivision sector after curfew will be shot.-$happy:12:Your neighborhood watch officer will be by to collect urine samples in the morning.-$happy:13:Anyone caught intefering with the collection of urine samples will be shot.+    my @text = sort map { untaint($_) } glob( 't/text/[bc]*.txt' );++    my $bill_ = reslash( 't/text/bill-of-rights.txt' );+    my $const = reslash( 't/text/constitution.txt' );++    my @expected = split( /\n/, <<"EOF" );+$bill_:4:or prohibiting the free exercise thereof; or abridging the freedom of+$bill_:5:speech, or of the press; or the right of the people peaceably to assemble,+$bill_:6:and to petition the Government for a redress of grievances.+$const:3:We the People of the United States, in Order to form a more perfect+$const:4:Union, establish Justice, insure domestic Tranquility, provide for the+$const:5:common defense, promote the general Welfare, and secure the Blessings EOF      ack_lists_match( [ '-m', 3, '-w', 'the', @text ], \@expected, 'Should show only 3 lines per file' ); -    @expected = line_split( <<"EOF" );-$myth:3:In the case of Christianity and Judaism there exists the belief+    @expected = split( /\n/, <<"EOF" );+$bill_:4:or prohibiting the free exercise thereof; or abridging the freedom of EOF -    ack_lists_match( [ '-1', '-w', 'the', @text ], \@expected, 'We should only get one line back for the entire run, not just per file.' );+ack_lists_match( [ '-1', '-w', 'the', @text ], \@expected, 'We should only get one line back for the entire run, not just per file.' ); }; + subtest '-m with -L' => sub {     plan tests => 2;      my @files    = reslash( 't/text' );     my @args     = ( '-m', 3, '-l', '--sort-files', 'the' );     my @results  = run_ack( @args, @files );-    my @expected = map { reslash( "t/text/$_" ) } (-        '4th-of-july.txt', 'boy-named-sue.txt', 'freedom-of-choice.txt'-    );+    my @expected = map { reslash( "t/text/$_" ) } qw( amontillado.txt bill-of-rights.txt constitution.txt );      is_deeply(\@results, \@expected); };

t/ack-match.t

@@ -26,7 +26,8 @@ run_ack( '--match', 'Sue' ); subtest 'Not giving a regex when piping into ack should result in an error' => sub {     plan tests => 3; -    my ($stdout, $stderr) = pipe_into_ack_with_stderr( 't/text/4th-of-july.txt', '--perl' );+    # Not giving a regex when piping into ack should result in an error.+    my ($stdout, $stderr) = pipe_into_ack_with_stderr( 't/text/amontillado.txt', '--perl' );     isnt( get_rc(), 0, 'ack should return an error when piped into without a regex' );     is_empty_array( $stdout, 'ack should return no STDOUT when piped into without a regex' );     is( scalar @{$stderr}, 1, 'ack should return one line of error message when piped into without a regex' ) or diag(explain($stderr));

t/ack-o.t

@@ -11,20 +11,15 @@ use Util; prep_environment();  NO_O: {-    my @files = qw( t/text/boy-named-sue.txt );+    my @files = qw( t/text/gettysburg.txt );     my @args = qw( the\\s+\\S+ );     my @expected = line_split( <<'EOF' );-        But the meanest thing that he ever did-        But I made me a vow to the moon and stars-        That I'd search the honky-tonks and bars-        Sat the dirty, mangy dog that named me Sue.-        Well, I hit him hard right between the eyes-        And we crashed through the wall and into the street-        Kicking and a-gouging in the mud and the blood and the beer.-        And it's the name that helped to make you strong."-        And I know you hate me, and you got the right-        For the gravel in ya gut and the spit in ya eye-        Cause I'm the son-of-a-bitch that named you Sue."+        but it can never forget what they did here. It is for us the living,+        rather, to be dedicated here to the unfinished work which they who+        here dedicated to the great task remaining before us -- that from these+        the last full measure of devotion -- that we here highly resolve that+        shall have a new birth of freedom -- and that government of the people,+        by the people, for the people, shall not perish from the earth. EOF     s/^\s+// for @expected; @@ -33,24 +28,17 @@ EOF   WITH_O: {-    my @files = qw( t/text/boy-named-sue.txt );+    my @files = qw( t/text/gettysburg.txt );     my @args = qw( the\\s+\\S+ -o );     my @expected = line_split( <<'EOF' );-        the meanest-        the moon-        the honky-tonks-        the dirty,-        the eyes-        the wall-        the street-        the mud-        the blood-        the beer.-        the name-        the right-        the gravel-        the spit-        the son-of-a-bitch+        the living,+        the unfinished+        the great+        the last+        the people,+        the people,+        the people,+        the earth. EOF     s/^\s+// for @expected; @@ -61,33 +49,37 @@ EOF # Give an output function and find match in multiple files (so print filenames, just like grep -o). WITH_OUTPUT: {     my @files = qw( t/text/ );-    my @args = qw/ --output=x$1x question(\\S+) --sort-files /;+    my @args = qw/ --output=x$1x free(\\S+) --sort-files /;      my @target_file = map { reslash($_) } qw(-        t/text/science-of-myth.txt-        t/text/shut-up-be-happy.txt+        t/text/bill-of-rights.txt+        t/text/gettysburg.txt     );     my @expected = (-        "$target_file[0]:1:xedx",-        "$target_file[1]:15:xs.x",-        "$target_file[1]:21:x.x",+        "$target_file[0]:4:xdomx",+        "$target_file[1]:23:xdomx",     );      ack_sets_match( [ @args, @files ], \@expected, 'Find all the things with --output function' ); } ++# Find a match in multiple files, and output it in double quotes. OUTPUT_DOUBLE_QUOTES: {     my @files = qw( t/text/ );-    my @args  = ( '--output="$1"', 'question(\\S+)', '--sort-files' );+    my @args  = ( '--output="$1"', '(free\\w*)', '--sort-files' );      my @target_file = map { reslash($_) } qw(-        t/text/science-of-myth.txt-        t/text/shut-up-be-happy.txt+        t/text/bill-of-rights.txt+        t/text/constitution.txt+        t/text/gettysburg.txt     );     my @expected = (-        qq{$target_file[0]:1:"ed"},-        qq{$target_file[1]:15:"s."},-        qq{$target_file[1]:21:"."},+        qq{$target_file[0]:4:"free"},+        qq{$target_file[0]:4:"freedom"},+        qq{$target_file[0]:10:"free"},+        qq{$target_file[1]:32:"free"},+        qq{$target_file[2]:23:"freedom"},     );      ack_sets_match( [ @args, @files ], \@expected, 'Find all the things with --output function' );

t/ack-output.t

@@ -3,7 +3,7 @@ use warnings; use strict; -use Test::More tests => 44;+use Test::More tests => 42;  use lib 't'; use Util;@@ -11,27 +11,29 @@ use Util; prep_environment();  ARG: {-    my @expected = (-      'Sink, swim, go down with the shipxSink, swim, go down with the ship'-    );+    my @expected = line_split( <<'HERE' );+shall have a new birth of freedom -- and that government of the people,xshall have a new birth of freedom -- and that government of the people,+HERE -    my @files = qw( t/text/freedom-of-choice.txt );-    my @args = qw( swim --output=$_x$_ );+    my @files = qw( t/text/gettysburg.txt );+    my @args = qw( free --output=$_x$_ );     my @results = run_ack( @args, @files );      lists_match( \@results, \@expected, 'Matching line' ); }  ARG_MULTIPLE_FILES: {+    # Note the first line is there twice because it matches twice.     my @expected = line_split( <<'HERE' );-And there you were-He stood there lookin' at me and I saw him smile.-And I knew I wouldn't be there to help ya along.-In the case of Christianity and Judaism there exists the belief+or prohibiting the free exercise thereof; or abridging the freedom of+or prohibiting the free exercise thereof; or abridging the freedom of+A well regulated Militia, being necessary to the security of a free State,+Number of free Persons, including those bound to Service for a Term+shall have a new birth of freedom -- and that government of the people, HERE      my @files = qw( t/text );-    my @args = qw( there --sort-files -h --output=$_ );+    my @args = qw( free --sort-files -h --output=$_ );     my @results = run_ack( @args, @files );      lists_match( \@results, \@expected, 'Matching line' );@@ -39,11 +41,11 @@ HERE  MATCH: {     my @expected = (-      'swim'+        'free'     ); -    my @files = qw( t/text/freedom-of-choice.txt );-    my @args = qw( swim --output=$& );+    my @files = qw( t/text/gettysburg.txt );+    my @args = qw( free --output=$& );     my @results = run_ack( @args, @files );      lists_match( \@results, \@expected, 'Part of a line matching pattern' );@@ -51,55 +53,54 @@ MATCH: {  MATCH_MULTIPLE_FILES: {     my @expected = line_split( <<'HERE' );-t/text/4th-of-july.txt:22:there-t/text/boy-named-sue.txt:48:there-t/text/boy-named-sue.txt:52:there-t/text/science-of-myth.txt:3:there+t/text/bill-of-rights.txt:4:free+t/text/bill-of-rights.txt:4:free+t/text/bill-of-rights.txt:10:free+t/text/constitution.txt:32:free+t/text/gettysburg.txt:23:free HERE      my @files = qw ( t/text );-    my @args = qw( there --sort-files --output=$& );+    my @args = qw( free --sort-files --output=$& );     my @results = run_ack( @args, @files );      lists_match( \@results, \@expected, 'Part of a line matching pattern' ); }  PREMATCH: {+    # No HEREDOC here since we do not want our editor/IDE messing with trailing whitespace.     my @expected = (-      'Sink, '+        'shall have a new birth of '     ); -    my @files = qw( t/text/freedom-of-choice.txt );-    my @args = qw( swim --output=$` );+    my @files = qw( t/text/gettysburg.txt );+    my @args = qw( freedom --output=$` );     my @results = run_ack( @args, @files );      lists_match( \@results, \@expected, 'Part of a line preceding match' ); }  PREMATCH_MULTIPLE_FILES: {-     # No HEREDOC here since we do not want our editor/IDE messing with trailing whitespace.     my @expected = (-        'And ',-        'He stood ',-        'And I knew I wouldn\'t be ',-        'In the case of Christianity and Judaism ',+        'or prohibiting the free exercise thereof; or abridging the ',+        'shall have a new birth of '     );      my @files = qw( t/text/);-    my @args = qw( there -h --sort-files --output=$` );+    my @args = qw( freedom -h --sort-files --output=$` );     my @results = run_ack( @args, @files );      lists_match( \@results, \@expected, 'Part of a line preceding match' ); }  POSTMATCH: {-    my @expected = (-      ', go down with the ship'-    );+    my @expected = split( /\n/, <<'HERE' );+ -- and that government of the people,+HERE -    my @files = qw( t/text/freedom-of-choice.txt );-    my @args = qw( swim --output=$' );+    my @files = qw( t/text/gettysburg.txt );+    my @args = qw( freedom --output=$' );     my @results = run_ack( @args, @files );      lists_match( \@results, \@expected, 'Part of a line that follows match' );@@ -107,14 +108,12 @@ POSTMATCH: {  POSTMATCH_MULTIPLE_FILES: {     my @expected = line_split( <<'HERE' );- you were- lookin' at me and I saw him smile.- to help ya along.- exists the belief+ of+ -- and that government of the people, HERE      my @files = qw( t/text/ );-    my @args = qw( there -h --sort-files --output=$' );+    my @args = qw( freedom -h --sort-files --output=$' );     my @results = run_ack( @args, @files );      lists_match( \@results, \@expected, 'Part of a line that follows match' );@@ -122,11 +121,11 @@ HERE  SUBPATTERN_MATCH: {     my @expected = (-      'Sink-swim-ship'+        'love-God-Montresor'     ); -    my @files = qw( t/text/freedom-of-choice.txt );-    my @args = qw( ^(Sink).+(swim).+(ship)$ --output=$1-$2-$3 );+    my @files = qw( t/text/amontillado.txt );+    my @args = qw( (love).+(God).+(Montresor) --output=$1-$2-$3 );     my @results = run_ack( @args, @files );      lists_match( \@results, \@expected, 'Capturing parentheses match' );@@ -134,14 +133,13 @@ SUBPATTERN_MATCH: {  SUBPATTERN_MATCH_MULTIPLE_FILES: {     my @expected = line_split( <<'HERE' );-And-there-you-stood-there-lookin-be-there-to-Judaism-there-exists+the-free-exercise+a-free-State+of-free-Persons HERE      my @files = qw( t/text/ );-    my @args = qw( (\w+)\s(there)\s(\w+) -h --sort-files --output=$1-$2-$3 );+    my @args = qw( (\w+)\s(free)\s(\w+) -h --sort-files --output=$1-$2-$3 );     my @results = run_ack( @args, @files );      lists_match( \@results, \@expected, 'Capturing parentheses match' );@@ -149,11 +147,11 @@ HERE  INPUT_LINE_NUMBER: {     my @expected = (-      'line:3'+      'line:15'     ); -    my @files = qw( t/text/freedom-of-choice.txt );-    my @args = qw( swim --output=line:$. );+    my @files = qw( t/text/bill-of-rights.txt );+    my @args = qw( quartered --output=line:$. );     my @results = run_ack( @args, @files );      lists_match( \@results, \@expected, 'Line number' );@@ -161,14 +159,15 @@ INPUT_LINE_NUMBER: {  INPUT_LINE_NUMBER_MULTIPLE_FILES: {     my @expected = line_split( <<'HERE' );-t/text/4th-of-july.txt:22:line:22-t/text/boy-named-sue.txt:48:line:48-t/text/boy-named-sue.txt:52:line:52-t/text/science-of-myth.txt:3:line:3+t/text/bill-of-rights.txt:4:line:4+t/text/bill-of-rights.txt:4:line:4+t/text/bill-of-rights.txt:10:line:10+t/text/constitution.txt:32:line:32+t/text/gettysburg.txt:23:line:23 HERE      my @files = qw( t/text/ );-    my @args = qw( there --sort-files --output=line:$. );+    my @args = qw( free --sort-files --output=line:$. );     my @results = run_ack( @args, @files );      lists_match( \@results, \@expected, 'Line number' );@@ -176,10 +175,10 @@ HERE  LAST_PAREN_MATCH: {     my @expected = line_split( <<'HERE' );-t/text/4th-of-july.txt:12:love-t/text/boy-named-sue.txt:58:hate-t/text/boy-named-sue.txt:70:hate-t/text/shut-up-be-happy.txt:5:love+t/text/amontillado.txt:124:love+t/text/amontillado.txt:309:love+t/text/amontillado.txt:311:love+t/text/constitution.txt:267:hate HERE      my @files = qw( t/text/ );@@ -192,10 +191,10 @@ HERE  COMBOS_1: {     my @expected = line_split( <<'HERE' );-t/text/4th-of-july.txt:12:love-12- me,-t/text/boy-named-sue.txt:58:hate-58- me, and you got the right-t/text/boy-named-sue.txt:70:hate-70- that name!-t/text/shut-up-be-happy.txt:5:love-5-d ones, insurance agents or attorneys.+t/text/amontillado.txt:124:love-124-d; you are happy,+t/text/amontillado.txt:309:love-309- of God, Montresor!"+t/text/amontillado.txt:311:love-311- of God!"+t/text/constitution.txt:267:hate-267-ver, from any King, Prince, or foreign State. HERE      my @files = qw( t/text/ );@@ -205,12 +204,11 @@ HERE     lists_match( \@results, \@expected, 'Combos 1' ); } + COMBOS_2: {     my @expected = line_split( <<'HERE' );-t/text/4th-of-july.txt:13:happy-happy-happy-t/text/shut-up-be-happy.txt:20:happy-happy-happy-t/text/shut-up-be-happy.txt:23:happy-happy-happy-t/text/shut-up-be-happy.txt:26:Happy-Happy-Happy+t/text/amontillado.txt:124:happy-happy-happy+t/text/raven.txt:73:happy-happy-happy HERE      my @files = qw( t/text/ );@@ -223,10 +221,8 @@ HERE  COMBOS_3: {     my @expected = line_split( <<'HERE' );-t/text/4th-of-july.txt:13:And you're --- to be with me on the 4th of July--happy-t/text/shut-up-be-happy.txt:20:Shut up! Be ---.--happy-t/text/shut-up-be-happy.txt:23:Be ---.--happy-t/text/shut-up-be-happy.txt:26:    -- "Shut Up, Be ---", Jello Biafra--Happy+t/text/amontillado.txt:124:precious. You are rich, respected, admired, beloved; you are ---,--happy+t/text/raven.txt:73:Caught from some un--- master whom unmerciful Disaster--happy HERE      my @files = qw( t/text/ );@@ -240,25 +236,11 @@ HERE NUMERIC_SUBSTITUTIONS: {     # Make sure that substitutions don't affect future substitutions.     my @expected = line_split( <<'HERE' );-t/text/shut-up-be-happy.txt:9:Ninety-five is 95 and seventy-six is 76-HERE--    my @files = qw( t/text/ );-    my @args = ( '(\d+) PM', '--output=Ninety-five is $.5 and seventy-six is $16' );-    my @results = run_ack( @args, @files );--    lists_match( \@results, \@expected, 'Numeric substitutions' );-}---NUMERIC_SUBSTITUTIONS: {-    # Make sure that substitutions don't affect future substitutions.-    my @expected = line_split( <<'HERE' );-t/text/shut-up-be-happy.txt:9:Ninety-five is 95 and seventy-six is 76+t/text/constitution.txt:269:Section 10 on line 269 HERE -    my @files = qw( t/text/ );-    my @args = ( '(\d+) PM', '--output=Ninety-five is $.5 and seventy-six is $16' );+    my @files = qw( t/text/bill-of-rights.txt t/text/constitution.txt );+    my @args = ( '(\d\d)', '--output=Section $1 on line $.' );     my @results = run_ack( @args, @files );      lists_match( \@results, \@expected, 'Numeric substitutions' );@@ -268,49 +250,52 @@ HERE CHARACTER_SUBSTITUTIONS: {     # Make sure that substitutions don't affect future substitutions.     my @expected = line_split( <<"HERE" );-t/text/shut-up-be-happy.txt:11:Remain calm.-Do not panic.\tDo not panic.+t/text/bill-of-rights.txt:15:No Soldier shall, in time of peace be+in any house, without\tin any house, without HERE      my @files = qw( t/text/ );-    my @args = ( '(Remain calm\.)\s+(.+)', '--output=$1\n$2\t$2' );+    my @args = ( '\s+quartered\s+(.+)', '--output=$`\n$1\t$1' );     my @results = run_ack( @args, @files );      lists_match( \@results, \@expected, 'Character substitutions' ); } + # $f=$filenname, needed for grep,  emulating ack2 $filename:$lineno:$_ FILENAME_SUBSTITUTION_1 : {-    my @expected = (-      't/text/freedom-of-choice.txt:3:Sink, swim, go down with the ship'-    );+    my @expected = line_split( <<'HERE' );+t/text/ozymandias.txt:4:Half sunk, a shattered visage lies, whose frown,+HERE -    my @files = qw( t/text/freedom-of-choice.txt );-    my @args = qw( swim --output=$f:$.:$_ );+    my @files = qw( t/text/ozymandias.txt );+    my @args = qw( visage --output=$f:$.:$_ );     my @results = run_ack( @args, @files );      lists_match( \@results, \@expected, 'Filename with matching line' ); } + FILENAME_SUBSTITUTION_2 : {-    my @expected = (-      't/text/freedom-of-choice.txt:3:swim'-    );+    my @expected = line_split( <<'HERE' );+t/text/ozymandias.txt:4:visage+HERE -    my @files = qw( t/text/freedom-of-choice.txt );-    my @args = qw( swim --output=$f:$.:$& );+    my @files = qw( t/text/ozymandias.txt );+    my @args = qw( visage --output=$f:$.:$& );     my @results = run_ack( @args, @files );      lists_match( \@results, \@expected, 'Filename with match' ); } + FILENAME_SUBSTITUTION_3 : {-    my @expected = (-      't/text/freedom-of-choice.txt:3:swim'-    );+    my @expected = line_split( <<'HERE' );+t/text/ozymandias.txt:4:visage+HERE -    my @files = qw( t/text/freedom-of-choice.txt );-    my @args = qw( (sink|swim) --output=$f:$.:$+ );+    my @files = qw( t/text/ozymandias.txt );+    my @args = qw( (visage) --output=$f:$.:$+ );     my @results = run_ack( @args, @files );      lists_match( \@results, \@expected, 'Filename with last match' );

t/ack-pager.t

@@ -18,17 +18,21 @@ plan tests => 9; prep_environment();  NO_PAGER: {-    my @args = qw(--nocolor --sort-files Sue t/text);+    my @args = qw(--nocolor --sort-files -i nevermore t/text);      my @expected = line_split( <<'END_TEXT' );-t/text/boy-named-sue.txt-6:Was before he left, he went and named me Sue.-13:I tell ya, life ain't easy for a boy named Sue.-27:Sat the dirty, mangy dog that named me Sue.-34:And I said: "My name is Sue! How do you do! Now you gonna die!"-62:Cause I'm the son-of-a-bitch that named you Sue."-70:Bill or George! Anything but Sue! I still hate that name!-72:    -- "A Boy Named Sue", Johnny Cash+t/text/raven.txt+55:    Quoth the Raven, "Nevermore."+62:    With such name as "Nevermore."+69:    Then the bird said, "Nevermore."+76:    Of 'Never -- nevermore.'+83:    Meant in croaking "Nevermore."+90:    She shall press, ah, nevermore!+97:    Quoth the Raven, "Nevermore."+104:    Quoth the Raven, "Nevermore."+111:    Quoth the Raven, "Nevermore."+118:    Quoth the Raven, "Nevermore."+125:    Shall be lifted--nevermore! END_TEXT      my @got = run_ack_interactive(@args);@@ -37,17 +41,21 @@ END_TEXT }  PAGER: {-    my @args = qw(--nocolor --pager=./test-pager --sort-files Sue t/text);+    my @args = qw(--nocolor --pager=./test-pager --sort-files -i nevermore t/text);      my @expected = line_split( <<'END_TEXT' );-t/text/boy-named-sue.txt-6:Was before he left, he went and named me Sue.-13:I tell ya, life ain't easy for a boy named Sue.-27:Sat the dirty, mangy dog that named me Sue.-34:And I said: "My name is Sue! How do you do! Now you gonna die!"-62:Cause I'm the son-of-a-bitch that named you Sue."-70:Bill or George! Anything but Sue! I still hate that name!-72:    -- "A Boy Named Sue", Johnny Cash+t/text/raven.txt+55:    Quoth the Raven, "Nevermore."+62:    With such name as "Nevermore."+69:    Then the bird said, "Nevermore."+76:    Of 'Never -- nevermore.'+83:    Meant in croaking "Nevermore."+90:    She shall press, ah, nevermore!+97:    Quoth the Raven, "Nevermore."+104:    Quoth the Raven, "Nevermore."+111:    Quoth the Raven, "Nevermore."+118:    Quoth the Raven, "Nevermore."+125:    Shall be lifted--nevermore! END_TEXT      my @got = run_ack_interactive(@args);@@ -56,13 +64,15 @@ END_TEXT }  PAGER_WITH_OPTS: {-    my @args = ('--nocolor', '--pager=./test-pager --skip=2', '--sort-files', 'Sue', 't/text');+    my @args = ('--nocolor', '--pager=./test-pager --skip=2', '--sort-files', '-i', 'nevermore', 't/text');      my @expected = line_split( <<'END_TEXT' );-t/text/boy-named-sue.txt-13:I tell ya, life ain't easy for a boy named Sue.-34:And I said: "My name is Sue! How do you do! Now you gonna die!"-70:Bill or George! Anything but Sue! I still hate that name!+t/text/raven.txt+62:    With such name as "Nevermore."+76:    Of 'Never -- nevermore.'+90:    She shall press, ah, nevermore!+104:    Quoth the Raven, "Nevermore."+118:    Quoth the Raven, "Nevermore." END_TEXT      my @got = run_ack_interactive(@args);@@ -71,17 +81,22 @@ END_TEXT }  FORCE_NO_PAGER: {-    my @args = ('--nocolor', '--pager=./test-pager --skip=2', '--nopager', '--sort-files', 'Sue', 't/text');+    my @args = ('--nocolor', '--pager=./test-pager --skip=2', '--nopager', '--sort-files',+        '-i', 'nevermore', 't/text');      my @expected = line_split( <<'END_TEXT' );-t/text/boy-named-sue.txt-6:Was before he left, he went and named me Sue.-13:I tell ya, life ain't easy for a boy named Sue.-27:Sat the dirty, mangy dog that named me Sue.-34:And I said: "My name is Sue! How do you do! Now you gonna die!"-62:Cause I'm the son-of-a-bitch that named you Sue."-70:Bill or George! Anything but Sue! I still hate that name!-72:    -- "A Boy Named Sue", Johnny Cash+t/text/raven.txt+55:    Quoth the Raven, "Nevermore."+62:    With such name as "Nevermore."+69:    Then the bird said, "Nevermore."+76:    Of 'Never -- nevermore.'+83:    Meant in croaking "Nevermore."+90:    She shall press, ah, nevermore!+97:    Quoth the Raven, "Nevermore."+104:    Quoth the Raven, "Nevermore."+111:    Quoth the Raven, "Nevermore."+118:    Quoth the Raven, "Nevermore."+125:    Shall be lifted--nevermore! END_TEXT      my @got = run_ack_interactive(@args);@@ -93,13 +108,15 @@ PAGER_ENV: {     local $ENV{'ACK_PAGER'} = './test-pager --skip=2';     local $TODO             = q{Setting ACK_PAGER in tests won't work for the time being}; -    my @args = ('--nocolor', '--sort-files', 'Sue', 't/text');+    my @args = ('--nocolor', '--sort-files', '-i', 'nevermore', 't/text');      my @expected = line_split( <<'END_TEXT' );-t/text/boy-named-sue.txt-13:I tell ya, life ain't easy for a boy named Sue.-34:And I said: "My name is Sue! How do you do! Now you gonna die!"-70:Bill or George! Anything but Sue! I still hate that name!+t/text/raven.txt+62:    With such name as "Nevermore."+76:    Of 'Never -- nevermore.'+90:    She shall press, ah, nevermore!+104:    Quoth the Raven, "Nevermore."+118:    Quoth the Raven, "Nevermore." END_TEXT      my @got = run_ack_interactive(@args);@@ -110,17 +127,21 @@ END_TEXT PAGER_ENV_OVERRIDE: {     local $ENV{'ACK_PAGER'} = './test-pager --skip=2'; -    my @args = ('--nocolor', '--nopager', '--sort-files', 'Sue', 't/text');+    my @args = ('--nocolor', '--nopager', '--sort-files', '-i', 'nevermore', 't/text');      my @expected = line_split( <<'END_TEXT' );-t/text/boy-named-sue.txt-6:Was before he left, he went and named me Sue.-13:I tell ya, life ain't easy for a boy named Sue.-27:Sat the dirty, mangy dog that named me Sue.-34:And I said: "My name is Sue! How do you do! Now you gonna die!"-62:Cause I'm the son-of-a-bitch that named you Sue."-70:Bill or George! Anything but Sue! I still hate that name!-72:    -- "A Boy Named Sue", Johnny Cash+t/text/raven.txt+55:    Quoth the Raven, "Nevermore."+62:    With such name as "Nevermore."+69:    Then the bird said, "Nevermore."+76:    Of 'Never -- nevermore.'+83:    Meant in croaking "Nevermore."+90:    She shall press, ah, nevermore!+97:    Quoth the Raven, "Nevermore."+104:    Quoth the Raven, "Nevermore."+111:    Quoth the Raven, "Nevermore."+118:    Quoth the Raven, "Nevermore."+125:    Shall be lifted--nevermore! END_TEXT      my @got = run_ack_interactive(@args);@@ -128,18 +149,21 @@ END_TEXT     lists_match( \@got, \@expected, 'PAGER_ENV_OVERRIDE' ); } + PAGER_ACKRC: {-    my @args = ('--nocolor', '--sort-files', 'Sue', 't/text');+    my @args = ('--nocolor', '--sort-files', '-i', 'nevermore', 't/text');      my $ackrc = <<'END_ACKRC'; --pager=./test-pager --skip=2 END_ACKRC      my @expected = line_split( <<'END_TEXT' );-t/text/boy-named-sue.txt-13:I tell ya, life ain't easy for a boy named Sue.-34:And I said: "My name is Sue! How do you do! Now you gonna die!"-70:Bill or George! Anything but Sue! I still hate that name!+t/text/raven.txt+62:    With such name as "Nevermore."+76:    Of 'Never -- nevermore.'+90:    She shall press, ah, nevermore!+104:    Quoth the Raven, "Nevermore."+118:    Quoth the Raven, "Nevermore." END_TEXT      my @got = run_ack_interactive(@args, {@@ -149,22 +173,27 @@ END_TEXT     lists_match( \@got, \@expected, 'PAGER_ACKRC' ); } + PAGER_ACKRC_OVERRIDE: {-    my @args = ('--nocolor', '--nopager', '--sort-files', 'Sue', 't/text');+    my @args = ('--nocolor', '--nopager', '--sort-files', '-i', 'nevermore', 't/text');      my $ackrc = <<'END_ACKRC'; --pager=./test-pager --skip=2 END_ACKRC      my @expected = line_split( <<'END_TEXT' );-t/text/boy-named-sue.txt-6:Was before he left, he went and named me Sue.-13:I tell ya, life ain't easy for a boy named Sue.-27:Sat the dirty, mangy dog that named me Sue.-34:And I said: "My name is Sue! How do you do! Now you gonna die!"-62:Cause I'm the son-of-a-bitch that named you Sue."-70:Bill or George! Anything but Sue! I still hate that name!-72:    -- "A Boy Named Sue", Johnny Cash+t/text/raven.txt+55:    Quoth the Raven, "Nevermore."+62:    With such name as "Nevermore."+69:    Then the bird said, "Nevermore."+76:    Of 'Never -- nevermore.'+83:    Meant in croaking "Nevermore."+90:    She shall press, ah, nevermore!+97:    Quoth the Raven, "Nevermore."+104:    Quoth the Raven, "Nevermore."+111:    Quoth the Raven, "Nevermore."+118:    Quoth the Raven, "Nevermore."+125:    Shall be lifted--nevermore! END_TEXT      my @got = run_ack_interactive(@args, {@@ -177,17 +206,21 @@ END_TEXT PAGER_NOENV: {     local $ENV{'ACK_PAGER'} = './test-pager --skip=2'; -    my @args = ('--nocolor', '--noenv', '--sort-files', 'Sue', 't/text');+    my @args = ('--nocolor', '--noenv', '--sort-files', '-i', 'nevermore', 't/text');      my @expected = line_split( <<'END_TEXT' );-t/text/boy-named-sue.txt-6:Was before he left, he went and named me Sue.-13:I tell ya, life ain't easy for a boy named Sue.-27:Sat the dirty, mangy dog that named me Sue.-34:And I said: "My name is Sue! How do you do! Now you gonna die!"-62:Cause I'm the son-of-a-bitch that named you Sue."-70:Bill or George! Anything but Sue! I still hate that name!-72:    -- "A Boy Named Sue", Johnny Cash+t/text/raven.txt+55:    Quoth the Raven, "Nevermore."+62:    With such name as "Nevermore."+69:    Then the bird said, "Nevermore."+76:    Of 'Never -- nevermore.'+83:    Meant in croaking "Nevermore."+90:    She shall press, ah, nevermore!+97:    Quoth the Raven, "Nevermore."+104:    Quoth the Raven, "Nevermore."+111:    Quoth the Raven, "Nevermore."+118:    Quoth the Raven, "Nevermore."+125:    Shall be lifted--nevermore! END_TEXT      my @got = run_ack_interactive(@args);

t/ack-passthru.t

@@ -10,47 +10,41 @@ use Util;  prep_environment(); -my @full_lyrics = <DATA>;-chomp @full_lyrics;+my @full_speech = <DATA>;+chomp @full_speech;  NORMAL: {     my @expected = line_split( <<'EOF' );-Painting a picture of you-And I'm looking at you-Looking at me, telling me you love me,-And you're happy to be with me on the 4th of July-If you ain't got no one-To keep you hanging on-And there you were-Like a queen in your nightgown-And I'm singing to you-And I'm lookin' for you+Now we are engaged in a great civil war, testing whether that nation,+on a great battle-field of that war. We have come to dedicate a portion EOF -    my @files = qw( t/text/4th-of-july.txt );-    my @args = qw( you );+    my @files = qw( t/text/gettysburg.txt );+    my @args = qw( war );     my @results = run_ack( @args, @files ); -    lists_match( \@results, \@expected, q{I'm lookin' for you} );+    lists_match( \@results, \@expected, 'Search for war' ); }  DASH_C: {-    my @expected = @full_lyrics;+    my @expected = @full_speech; -    my @files = qw( t/text/4th-of-july.txt );-    my @args = qw( you --passthru );+    my @files = qw( t/text/gettysburg.txt );+    my @args = qw( war --passthru );     my @results = run_ack( @args, @files ); -    lists_match( \@results, \@expected, q{Still lookin' for you, in passthru mode} );+    lists_match( \@results, \@expected, q{Still lookin' for war, in passthru mode} ); } + SKIP: {     skip 'Input options have not been implemented for Win32 yet', 2 if is_windows(); -    my @ack_args = qw( July --passthru --color );-    my @results = pipe_into_ack( 't/text/4th-of-july.txt', @ack_args );+    # Some lines will match, most won't.+    my @ack_args = qw( war --passthru --color );+    my @results = pipe_into_ack( 't/text/gettysburg.txt', @ack_args ); -    is( scalar @results, scalar @full_lyrics, 'Got all the lines back' );+    is( scalar @results, scalar @full_speech, 'Got all the lines back' );      my @escaped_lines = grep { /\e/ } @results;     is( scalar @escaped_lines, 2, 'Only two lines are highlighted' );@@ -60,40 +54,27 @@ done_testing(); exit 0;  __DATA__-Alone with the morning burning red-On the canvas in my head-Painting a picture of you-And me driving across country-In a dusty old RV-Just the road and its majesty-And I'm looking at you-With the world in the rear view--Chorus:-You were pretty as can be, sitting in the front seat-Looking at me, telling me you love me,-And you're happy to be with me on the 4th of July-We sang "Stranglehold" to the stereo-Couldn't take no more of that rock and roll-So we put on a little George Jones and just sang along--Those white lines-Get drawn into the sun-If you ain't got no one-To keep you hanging on-And there you were-Like a queen in your nightgown-Riding shotgun from town to town-Staking a claim on the world we found-And I'm singing to you-You're singing to me-You were out of the blue to a boy like me--Chorus--And I'm lookin' for you-In the silence that we shared--Chorus--    -- "4th of July", Shooter Jennings+Four score and seven years ago our fathers brought forth on this+continent, a new nation, conceived in Liberty, and dedicated to the+proposition that all men are created equal.++Now we are engaged in a great civil war, testing whether that nation,+or any nation so conceived and so dedicated, can long endure. We are met+on a great battle-field of that war. We have come to dedicate a portion+of that field, as a final resting place for those who here gave their+lives that that nation might live. It is altogether fitting and proper+that we should do this.++But, in a larger sense, we can not dedicate -- we can not consecrate --+we can not hallow -- this ground. The brave men, living and dead, who+struggled here, have consecrated it, far above our poor power to add or+detract. The world will little note, nor long remember what we say here,+but it can never forget what they did here. It is for us the living,+rather, to be dedicated here to the unfinished work which they who+fought here have thus far so nobly advanced. It is rather for us to be+here dedicated to the great task remaining before us -- that from these+honored dead we take increased devotion to that cause for which they gave+the last full measure of devotion -- that we here highly resolve that+these dead shall not have died in vain -- that this nation, under God,+shall have a new birth of freedom -- and that government of the people,+by the people, for the people, shall not perish from the earth.

t/ack-print0.t

@@ -12,12 +12,13 @@ prep_environment();  G_NO_PRINT0: {     my @expected = qw(-        t/text/4th-of-july.txt-        t/text/freedom-of-choice.txt-        t/text/science-of-myth.txt+        t/text/amontillado.txt+        t/text/bill-of-rights.txt+        t/text/constitution.txt+        t/text/ozymandias.txt     ); -    my $filename_regex = 'of';+    my $filename_regex = 'i';     my @files = qw( t/text/ );     my @args = ( '-g', $filename_regex );     my @results = run_ack( @args, @files );@@ -28,12 +29,13 @@ G_NO_PRINT0: {  G_PRINT0: {     my $expected = join( "\0", map { reslash($_) } qw(-        t/text/4th-of-july.txt-        t/text/freedom-of-choice.txt-        t/text/science-of-myth.txt+        t/text/amontillado.txt+        t/text/bill-of-rights.txt+        t/text/constitution.txt+        t/text/ozymandias.txt     ) ) . "\0"; # string of filenames separated and concluded with null byte -    my $filename_regex = 'of';+    my $filename_regex = 'i';     my @files = qw( t/text );     my @args = ( '-g', $filename_regex, '--sort-files', '--print0' );     my @results = run_ack( @args, @files );

t/ack-proximate.t

@@ -10,28 +10,36 @@ use Util;  prep_environment(); +my $const = reslash( 't/text/constitution.txt' );+my $bill  = reslash( 't/text/bill-of-rights.txt' );+ subtest 'Grouped proximate' => sub {     plan tests => 1; -    my $myth = reslash( 't/text/science-of-myth.txt' );-    my $sue  = reslash( 't/text/boy-named-sue.txt' );-    my @expected = line_split( <<"EOF" );-$sue-11:Some gal would giggle and I'd turn red-12:And some guy'd laugh and I'd bust his head,+    my @expected = line_split( <<"HERE" );+$bill+53:fact tried by a jury, shall be otherwise re-examined in any Court of++$const+199:To constitute Tribunals inferior to the supreme Court;++372:Judges of the supreme Court, and all other Officers of the United States,++376:in the Courts of Law, or in the Heads of Departments. -$myth-10:Somehow no matter what the world keeps turning-11:Somehow we get by without ever learning+404:Court, and in such inferior Courts as the Congress may from time to -21:'cause some things are better left without a doubt+406:Courts, shall hold their Offices during good Behaviour, and shall, at -23:Somehow no matter what the world keeps turning-24:Somehow we get by without ever learning-EOF+425:and those in which a State shall be Party, the supreme Court shall++427:the supreme Court shall have appellate Jurisdiction, both as to Law and++441:of two Witnesses to the same overt Act, or on Confession in open Court.+HERE      my @files = qw( t/text );-    my @args = qw( --proximate -i --group --sort some );+    my @args = qw( --proximate -i --group --sort court );      ack_lists_match( [ @args, @files ], \@expected, 'Grouped proximate' ); };@@ -40,23 +48,28 @@ EOF subtest 'Ungrouped proximate' => sub {     plan tests => 1; -    my $myth = reslash( 't/text/science-of-myth.txt' );-    my $sue  = reslash( 't/text/boy-named-sue.txt' );-    my @expected = line_split( <<"EOF" );-$sue:11:Some gal would giggle and I'd turn red-$sue:12:And some guy'd laugh and I'd bust his head,+    my @expected = line_split( <<"HERE" );+$bill:53:fact tried by a jury, shall be otherwise re-examined in any Court of++$const:199:To constitute Tribunals inferior to the supreme Court;++$const:372:Judges of the supreme Court, and all other Officers of the United States, -$myth:10:Somehow no matter what the world keeps turning-$myth:11:Somehow we get by without ever learning+$const:376:in the Courts of Law, or in the Heads of Departments. -$myth:21:'cause some things are better left without a doubt+$const:404:Court, and in such inferior Courts as the Congress may from time to -$myth:23:Somehow no matter what the world keeps turning-$myth:24:Somehow we get by without ever learning-EOF+$const:406:Courts, shall hold their Offices during good Behaviour, and shall, at++$const:425:and those in which a State shall be Party, the supreme Court shall++$const:427:the supreme Court shall have appellate Jurisdiction, both as to Law and++$const:441:of two Witnesses to the same overt Act, or on Confession in open Court.+HERE      my @files = qw( t/text );-    my @args = qw( --proximate -i --nogroup --sort some );+    my @args = qw( --proximate -i --nogroup --sort court );      ack_lists_match( [ @args, @files ], \@expected, 'Ungrouped proximate' ); };@@ -65,25 +78,28 @@ EOF subtest 'Grouped proximate=2' => sub {     plan tests => 1; -    my $sue = reslash( 't/text/boy-named-sue.txt' );-    my @expected = line_split( <<"EOF" );-$sue-4:Now, I don't blame him 'cause he run and hid+    my @expected = line_split( <<"HERE" );+$bill+53:fact tried by a jury, shall be otherwise re-examined in any Court of++$const+199:To constitute Tribunals inferior to the supreme Court; -33:And I looked at him and my blood ran cold+372:Judges of the supreme Court, and all other Officers of the United States, -36:Well, I hit him hard right between the eyes+376:in the Courts of Law, or in the Heads of Departments. -46:I heard him laugh and then I heard him cuss,-48:He stood there lookin' at me and I saw him smile.+404:Court, and in such inferior Courts as the Congress may from time to+406:Courts, shall hold their Offices during good Behaviour, and shall, at -65:I called him my pa, and he called me his son,-67:And I think about him, now and then,-69:And if I ever have a son, I think I'm gonna name him-EOF+425:and those in which a State shall be Party, the supreme Court shall+427:the supreme Court shall have appellate Jurisdiction, both as to Law and++441:of two Witnesses to the same overt Act, or on Confession in open Court.+HERE      my @files = qw( t/text );-    my @args = qw( --proximate=2 --group -w him );+    my @args = qw( --proximate=2 --group -i court );      ack_lists_match( [ @args, @files ], \@expected, 'Grouped proximate=2' ); };@@ -93,53 +109,54 @@ EOF subtest 'Ungrouped proximate=2' => sub {     plan tests => 1; -    my $sue = reslash( 't/text/boy-named-sue.txt' );-    my @expected = line_split( <<"EOF" );-$sue:4:Now, I don't blame him 'cause he run and hid+    my @expected = line_split( <<"HERE" );+$bill:53:fact tried by a jury, shall be otherwise re-examined in any Court of++$const:199:To constitute Tribunals inferior to the supreme Court;++$const:372:Judges of the supreme Court, and all other Officers of the United States, -$sue:33:And I looked at him and my blood ran cold+$const:376:in the Courts of Law, or in the Heads of Departments. -$sue:36:Well, I hit him hard right between the eyes+$const:404:Court, and in such inferior Courts as the Congress may from time to+$const:406:Courts, shall hold their Offices during good Behaviour, and shall, at -$sue:46:I heard him laugh and then I heard him cuss,-$sue:48:He stood there lookin' at me and I saw him smile.+$const:425:and those in which a State shall be Party, the supreme Court shall+$const:427:the supreme Court shall have appellate Jurisdiction, both as to Law and -$sue:65:I called him my pa, and he called me his son,-$sue:67:And I think about him, now and then,-$sue:69:And if I ever have a son, I think I'm gonna name him-EOF+$const:441:of two Witnesses to the same overt Act, or on Confession in open Court.+HERE      my @files = qw( t/text );-    my @args = qw( --proximate=2 --nogroup -w him );+    my @args = qw( --proximate=2 --nogroup -i court );      ack_lists_match( [ @args, @files ], \@expected, 'Ungrouped proximate=2' ); };   -# --proximate=3 is almost the same as --proximate=2.-subtest 'Ungrouped proximate=3' => sub {+subtest 'Ungrouped proximate=20' => sub {     plan tests => 1; -    my $sue = reslash( 't/text/boy-named-sue.txt' );-    my @expected = line_split( <<"EOF" );-$sue:4:Now, I don't blame him 'cause he run and hid+    my @expected = line_split( <<"HERE" );+$bill:53:fact tried by a jury, shall be otherwise re-examined in any Court of -$sue:33:And I looked at him and my blood ran cold-$sue:36:Well, I hit him hard right between the eyes+$const:199:To constitute Tribunals inferior to the supreme Court; -$sue:46:I heard him laugh and then I heard him cuss,-$sue:48:He stood there lookin' at me and I saw him smile.+$const:372:Judges of the supreme Court, and all other Officers of the United States,+$const:376:in the Courts of Law, or in the Heads of Departments. -$sue:65:I called him my pa, and he called me his son,-$sue:67:And I think about him, now and then,-$sue:69:And if I ever have a son, I think I'm gonna name him-EOF+$const:404:Court, and in such inferior Courts as the Congress may from time to+$const:406:Courts, shall hold their Offices during good Behaviour, and shall, at+$const:425:and those in which a State shall be Party, the supreme Court shall+$const:427:the supreme Court shall have appellate Jurisdiction, both as to Law and+$const:441:of two Witnesses to the same overt Act, or on Confession in open Court.+HERE      my @files = qw( t/text );-    my @args = qw( --proximate=3 --nogroup -w him );+    my @args = qw( --proximate=20 --nogroup -i court ); -    ack_lists_match( [ @args, @files ], \@expected, 'Ungrouped proximate=3' );+    ack_lists_match( [ @args, @files ], \@expected, 'Ungrouped proximate=20' ); };  

t/ack-u.t

@@ -13,19 +13,21 @@ prep_environment();  Barfly->run_tests( 't/ack-u.barfly' ); +my $bill_ = reslash( 't/text/bill-of-rights.txt' );+my $space = ' ' x length($bill_);+ subtest 'Single file' => sub {     plan tests => 1; -    my $target_file = reslash( 't/text/boy-named-sue.txt' );-    my @expected = line_split( <<"EOF" );-But the meanest thing that he ever did-                ^^^^^-Bill or George! Anything but Sue! I still hate that name!-                   ^^^^^+    my @expected = line_split( <<'EOF' );+A well regulated Militia, being necessary to the security of a free State,+                 ^^^^^^^+cases arising in the land or naval forces, or in the Militia, when in+                                                     ^^^^^^^ EOF -    my @files = $target_file;-    my @args  = ( qw( -u ), 'thing' );+    my @files = $bill_;+    my @args  = ( qw( -u ), 'Militia' );      ack_lists_match( [ @args, @files ], \@expected, 'Single file' ); };@@ -34,33 +36,31 @@ EOF subtest 'Grouped' => sub {     plan tests => 1; -    my $target_file = reslash( 't/text/boy-named-sue.txt' );     my @expected = line_split( <<"EOF" );-$target_file-70:Bill or George! Anything but Sue! I still hate that name!-                   ^^^^^^^^+$bill_+10:A well regulated Militia, being necessary to the security of a free State,+                    ^^^^^^^+31:cases arising in the land or naval forces, or in the Militia, when in+                                                        ^^^^^^^ EOF -    my @files = 't/text/';-    my @args  = ( qw( -u --group ), 'Anything' );+    my @files = qw( t/text/bill-of-rights.txt t/text/ozymandias.txt ); # Don't want Constitution in here.+    my @args  = ( qw( -u --group ), 'Militia' );      ack_lists_match( [ @args, @files ], \@expected, 'Grouped' ); };   subtest 'Not grouped, with leading filename' => sub {-    my $target_file = reslash( 't/text/boy-named-sue.txt' );-    my $spacing____ = ' ' x length($target_file);-     my @expected = line_split( <<"EOF" );-$target_file:5:But the meanest thing that he ever did-$spacing____                   ^^^^^-$target_file:70:Bill or George! Anything but Sue! I still hate that name!-$spacing____                       ^^^^^+$bill_:10:A well regulated Militia, being necessary to the security of a free State,+$space                     ^^^^^^^+$bill_:31:cases arising in the land or naval forces, or in the Militia, when in+$space                                                         ^^^^^^^ EOF -    my $regex = 'thing';-    my @files = $target_file;+    my $regex = 'Militia';+    my @files = $bill_;     my @args  = ( qw( -u --nogroup -H ), $regex );      ack_lists_match( [ @args, @files ], \@expected, "Looking for $regex - before with line numbers" );

t/ack-underline.t

@@ -13,97 +13,95 @@ prep_environment(); # We need to do this tediously here rather than with Barfly because # Barfly relies on --underline working correctly. -my $july_ = reslash( 't/text/4th-of-july.txt' );-my $happy = reslash( 't/text/shut-up-be-happy.txt' );+my $bill_ = reslash( 't/text/bill-of-rights.txt' );+my $getty = reslash( 't/text/gettysburg.txt' );  # Spacing that the filenames take up.-my $spc_j = ' ' x length( $july_ );-my $spc_h = ' ' x length( $happy );+my $spc_b = ' ' x length( $bill_ );+my $spc_g = ' ' x length( $getty );  subtest 'Grouped --underline' => sub {     plan tests => 1; -    my @expected = line_split( <<"EOF" );-$july_-12:Looking at me, telling me you love me,-                                 ^^^^+    my @expected = line_split( <<"HERE" );+$bill_+4:or prohibiting the free exercise thereof; or abridging the freedom of+                                                             ^^^^^^^ -$happy-5:Do not attempt to contact loved ones, insurance agents or attorneys.-                            ^^^^-EOF+$getty+23:shall have a new birth of freedom -- and that government of the people,+                             ^^^^^^^+HERE -    my @args = qw( --underline --sort-files --group love t/text );+    my @args = qw( --underline --sort-files --group freedom t/text ); -    ack_lists_match( [ @args ], \@expected, 'Looking for love, grouped' );+    ack_lists_match( [ @args ], \@expected, 'Looking for freedom, grouped' ); };   subtest 'Ungrouped --underline' => sub {     plan tests => 1; -    my @expected = line_split( <<"EOF" );-$july_:12:Looking at me, telling me you love me,-$spc_j                                  ^^^^-$happy:5:Do not attempt to contact loved ones, insurance agents or attorneys.-$spc_h                             ^^^^-EOF+    my @expected = line_split( <<"HERE" );+$bill_:4:or prohibiting the free exercise thereof; or abridging the freedom of+$spc_b                                                              ^^^^^^^+$getty:23:shall have a new birth of freedom -- and that government of the people,+$spc_g                              ^^^^^^^+HERE -    my @args = qw( --underline --sort-files --nogroup love t/text );+    my @args = qw( --underline --sort-files --nogroup freedom t/text ); -    ack_lists_match( [ @args ], \@expected, 'Looking for love, ungrouped' );+    ack_lists_match( [ @args ], \@expected, 'Looking for freedom, ungrouped' ); };   subtest 'Grouped --underline with context' => sub {     plan tests => 1; -    my @expected = line_split( <<"EOF" );-$july_-10-Chorus:-11-You were pretty as can be, sitting in the front seat-12:Looking at me, telling me you love me,-                                 ^^^^-13-And you're happy to be with me on the 4th of July-14-We sang "Stranglehold" to the stereo--t/text/shut-up-be-happy.txt-3-All Constitutional rights have been suspended.-4-Stay in your homes.-5:Do not attempt to contact loved ones, insurance agents or attorneys.-                            ^^^^-6-Shut up.-7-Do not attempt to think or depression may occur.-EOF--    my @args = qw( --underline --sort-files --group -C love t/text );--    ack_lists_match( [ @args ], \@expected, 'Looking for love, grouped with context' );+    my @expected = line_split( <<"HERE" );+$bill_+2-+3-Congress shall make no law respecting an establishment of religion,+4:or prohibiting the free exercise thereof; or abridging the freedom of+                                                             ^^^^^^^+5-speech, or of the press; or the right of the people peaceably to assemble,+6-and to petition the Government for a redress of grievances.++$getty+21-the last full measure of devotion -- that we here highly resolve that+22-these dead shall not have died in vain -- that this nation, under God,+23:shall have a new birth of freedom -- and that government of the people,+                             ^^^^^^^+24-by the people, for the people, shall not perish from the earth.+HERE++    my @args = qw( --underline --sort-files --group -C free\w+ t/text );++    ack_lists_match( [ @args ], \@expected, 'Looking for freedom, grouped with context' ); };   subtest 'Ungrouped --underline with --context' => sub {     plan tests => 1; -    my @expected = line_split( <<"EOF" );-$july_-10-Chorus:-$july_-11-You were pretty as can be, sitting in the front seat-$july_:12:Looking at me, telling me you love me,-$spc_j                                  ^^^^-$july_-13-And you're happy to be with me on the 4th of July-$july_-14-We sang "Stranglehold" to the stereo+    my @expected = line_split( <<"HERE" );+$bill_-2-+$bill_-3-Congress shall make no law respecting an establishment of religion,+$bill_:4:or prohibiting the free exercise thereof; or abridging the freedom of+$spc_b                                                              ^^^^^^^+$bill_-5-speech, or of the press; or the right of the people peaceably to assemble,+$bill_-6-and to petition the Government for a redress of grievances. ---$happy-3-All Constitutional rights have been suspended.-$happy-4-Stay in your homes.-$happy:5:Do not attempt to contact loved ones, insurance agents or attorneys.-$spc_h                             ^^^^-$happy-6-Shut up.-$happy-7-Do not attempt to think or depression may occur.-EOF+$getty-21-the last full measure of devotion -- that we here highly resolve that+$getty-22-these dead shall not have died in vain -- that this nation, under God,+$getty:23:shall have a new birth of freedom -- and that government of the people,+$spc_g                              ^^^^^^^+$getty-24-by the people, for the people, shall not perish from the earth.+HERE -    my @args = qw( --underline --sort-files --nogroup -C love t/text );+    my @args = qw( --underline --sort-files --nogroup -C free\w+ t/text ); -    ack_lists_match( [ @args ], \@expected, 'Looking for love, ungrouped' );+    ack_lists_match( [ @args ], \@expected, 'Looking for freedom, ungrouped' ); };  exit 0;

t/ack-v.t

@@ -11,50 +11,50 @@ use Util; prep_environment();  NORMAL_CASE: {-    my @expected = ( 'Well, my daddy left home when I was three' );+    my @expected = ( '# The Cask of Amontillado, by Edgar Allen Poe' ); -    my @args  = qw( -v are -h -m1 );-    my @files = qw( t/text/boy-named-sue.txt );+    my @args  = qw( -v x -h -m1 );+    my @files = qw( t/text/amontillado.txt ); -    ack_lists_match( [ @args, @files ], \@expected, 'First line of a file that does not contain "are".' );+    ack_lists_match( [ @args, @files ], \@expected, 'First line of a file that does not contain "x".' ); }  DASH_L: {     my @expected = qw(-        t/text/4th-of-july.txt-        t/text/boy-named-sue.txt-        t/text/freedom-of-choice.txt-        t/text/me-and-bobbie-mcgee.txt+        t/text/amontillado.txt+        t/text/bill-of-rights.txt+        t/text/constitution.txt+        t/text/gettysburg.txt         t/text/number.txt         t/text/numbered-text.txt-        t/text/science-of-myth.txt-        t/text/shut-up-be-happy.txt+        t/text/ozymandias.txt+        t/text/raven.txt     ); -    my @args  = qw( religion -i -v -l --sort-files );+    my @args  = qw( free -i -v -l --sort-files );     my @files = qw( t/text ); -    ack_sets_match( [ @args, @files ], \@expected, 'No religion please' );+    ack_sets_match( [ @args, @files ], \@expected, 'No free' );      ack_sets_match( [ '.*', '-l', '-v', 't/text' ], [], '-l -v with .* (which matches any line) should have no results' ); }  DASH_C: {     my @expected = qw(-        t/text/4th-of-july.txt:37-        t/text/boy-named-sue.txt:72-        t/text/freedom-of-choice.txt:50-        t/text/me-and-bobbie-mcgee.txt:32+        t/text/amontillado.txt:206+        t/text/bill-of-rights.txt:45+        t/text/constitution.txt:259+        t/text/gettysburg.txt:15         t/text/number.txt:1         t/text/numbered-text.txt:20-        t/text/science-of-myth.txt:24-        t/text/shut-up-be-happy.txt:26+        t/text/ozymandias.txt:9+        t/text/raven.txt:77     ); -    my @args  = qw( religion -i -v -c --sort-files );+    my @args  = qw( the -i -w -v -c --sort-files );     my @files = qw( t/text ); -    ack_sets_match( [ @args, @files ], \@expected, 'Non-religion counts' );+    ack_sets_match( [ @args, @files ], \@expected, 'Non-the counts' ); }  done_testing();

t/ack-w.t

@@ -16,30 +16,30 @@ Barfly->run_tests( 't/ack-w.barfly' ); subtest '-w with trailing metachar \w' => sub {     plan tests => 1; -    my @expected = line_split( <<'EOF' );-At an old saloon on a street of mud,-Kicking and a-gouging in the mud and the blood and the beer.-EOF+    my @expected = line_split( <<'HERE' );+A well regulated Militia, being necessary to the security of a free State,+cases arising in the land or naval forces, or in the Militia, when in+HERE -    my @files = qw( t/text );-    my @args = qw( mu\w -w -h --sort-files );+    my @files = qw( t/text/bill-of-rights.txt );+    my @args = ( 'Milit\w\w', qw( -w -h --sort-files ) ); -    ack_lists_match( [ @args, @files ], \@expected, 'Looking for mu\\w' );+    ack_lists_match( [ @args, @files ], \@expected, 'Looking for militia with metacharacters' ); };   subtest '-w with trailing dot' => sub {     plan tests => 1; -    my @expected = line_split( <<'EOF' );-At an old saloon on a street of mud,-Kicking and a-gouging in the mud and the blood and the beer.-EOF+    my @expected = line_split( <<'HERE' );+A well regulated Militia, being necessary to the security of a free State,+cases arising in the land or naval forces, or in the Militia, when in+HERE -    my @files = qw( t/text );-    my @args = ( 'mu.', qw( -w -h --sort-files ) );+    my @files = qw( t/text/bill-of-rights.txt );+    my @args = ( 'Milit..', qw( -w -h --sort-files ) ); -    ack_lists_match( [ @args, @files ], \@expected, 'Looking for mu.' );+    ack_lists_match( [ @args, @files ], \@expected, 'Looking for Milit..' ); };  @@ -47,15 +47,15 @@ subtest 'Begins and ends with word char' => sub {     plan tests => 1;      # Normal case of whole word match.-    my @expected = line_split( <<'EOF' );-And I said: "My name is Sue! How do you do! Now you gonna die!"-To kill me now, and I wouldn't blame you if you do.-EOF+    my @expected = line_split( <<'HERE' );+A well regulated Militia, being necessary to the security of a free State,+cases arising in the land or naval forces, or in the Militia, when in+HERE -    my @files = qw( t/text );-    my @args = ( 'do', qw( -w -h --sort-files ) );+    my @files = qw( t/text/bill-of-rights.txt );+    my @args = qw( Militia -w -h --sort-files ); -    ack_lists_match( [ @args, @files ], \@expected, 'Looking for do as whole word' );+    ack_lists_match( [ @args, @files ], \@expected, 'Looking for Militia as whole word' ); };  @@ -63,48 +63,45 @@ subtest 'Ends with grouping parens' => sub {     plan tests => 1;      # The last character of the regexp is not a word, disabling the word boundary check at the end of the match.-    my @expected = (-        'Took us all the way to New Orleans',-    );+    my @expected = line_split( <<'HERE' );+A well regulated Militia, being necessary to the security of a free State,+cases arising in the land or naval forces, or in the Militia, when in+HERE -    my @files = qw( t/text );-    my @args = ( 'us()', qw( -w -h --sort-files ) );+    my @files = qw( t/text/bill-of-rights.txt );+    my @args = ( 'Militia()', qw( -w -h --sort-files ) ); -    ack_lists_match( [ @args, @files ], \@expected, 'Looking for us with word flag, but regexp does not end with word char' );+    ack_lists_match( [ @args, @files ], \@expected, 'Looking for Militia with word flag, but regexp does not end with word char' ); };   subtest 'Begins with grouping parens' => sub {     plan tests => 1; -    my @expected = line_split( <<'EOF' );-If you ain't got no one-He said: "Now you just fought one hell of a fight-He picked at one-He picked at one-But I'd trade all of my tomorrows for one single yesterday-The number one enemy of progress is questions.-EOF+    my @expected = line_split( <<'HERE' );+A well regulated Militia, being necessary to the security of a free State,+cases arising in the land or naval forces, or in the Militia, when in+HERE -    my @files = qw( t/text );-    my @args = ( '()one', qw( -w -h --sort-files ) );+    my @files = qw( t/text/bill-of-rights.txt );+    my @args = ( '()Militia', qw( -w -h --sort-files ) ); -    ack_lists_match( [ @args, @files ], \@expected, 'Looking for one with word flag, but regexp does not begin with word char' );+    ack_lists_match( [ @args, @files ], \@expected, 'Looking for Militia with word flag, but regexp does not begin with word char' ); };   subtest 'Wrapped in grouping parens' => sub {     plan tests => 1; -    my @expected = (-        'Consider the case of the woman whose faith helped her make it through',-        'When she was raped and cut up, left for dead in her trunk, her beliefs held true'-    );+    my @expected = line_split( <<'HERE' );+A well regulated Militia, being necessary to the security of a free State,+cases arising in the land or naval forces, or in the Militia, when in+HERE -    my @files = qw( t/text/science-of-myth.txt );-    my @args = ( '(her)', qw( -w -h --sort-files ) );+    my @files = qw( t/text/bill-of-rights.txt );+    my @args = ( '(Militia)', qw( -w -h --sort-files ) ); -    ack_lists_match( [ @args, @files ], \@expected, 'Looking for her with word flag, but regexp does not begin or end with word char' );+    ack_lists_match( [ @args, @files ], \@expected, 'Looking for Militia with word flag, but regexp does not begin or end with word char' ); };  @@ -128,7 +125,7 @@ subtest '-w warnings' => sub {      plan tests => @{$good} + @{$bad}; -    my $happy = reslash( 't/text/shut-up-be-happy.txt' );+    my $happy = reslash( 't/text/ozymandias.txt' );     for my $pattern ( @{$good} ) {         subtest "Good example: $pattern" => sub {             plan tests => 1;

t/ack-x.t

@@ -55,47 +55,31 @@ sub do_parent {  prep_environment(); -my $freedom = reslash( 't/text/freedom-of-choice.txt' );-my $fourth  = reslash( 't/text/4th-of-july.txt' );-my $science = reslash( 't/text/science-of-myth.txt' );+my $ozy__ = reslash( 't/text/ozymandias.txt' );+my $raven = reslash( 't/text/raven.txt' );  my @expected = line_split( <<"EOF" );-$freedom:1:A victim of collision on the open sea-$freedom:3:Sink, swim, go down with the ship-$freedom:6:I'll say it again in the land of the free-$freedom:15:He licked the other-$freedom:24:Seems to be the rule of thumb-$freedom:28:I'll say it again in the land of the free-$freedom:41:He licked the other-$fourth:1:Alone with the morning burning red-$fourth:2:On the canvas in my head-$fourth:6:Just the road and its majesty-$fourth:8:With the world in the rear view-$fourth:11:You were pretty as can be, sitting in the front seat-$fourth:13:And you're happy to be with me on the 4th of July-$fourth:14:We sang "Stranglehold" to the stereo-$fourth:19:Get drawn into the sun-$fourth:22:And there you were-$fourth:25:Staking a claim on the world we found-$fourth:28:You were out of the blue to a boy like me-$fourth:33:In the silence that we shared-$science:3:In the case of Christianity and Judaism there exists the belief-$science:6:The Buddhists believe that the functional aspects override the myth-$science:7:While other religions use the literal core to build foundations with-$science:8:See, half the world sees the myth as fact, and it's seen as a lie by the other half-$science:9:And the simple truth is that it's none of that 'cause-$science:10:Somehow no matter what the world keeps turning-$science:14:In fact, for better understanding we take the facts of science and apply them-$science:15:And if both factors keep evolving then we continue getting information-$science:16:But closing off the possibilities makes it hard to see the bigger picture-$science:18:Consider the case of the woman whose faith helped her make it through-$science:22:And if it works, then it gets the job done-$science:23:Somehow no matter what the world keeps turning+$ozy__:6:Tell that its sculptor well those passions read+$ozy__:8:The hand that mocked them, and the heart that fed:+$ozy__:13:Of that colossal wreck, boundless and bare+$raven:17:So that now, to still the beating of my heart, I stood repeating+$raven:26:That I scarce was sure I heard you" -- here I opened wide the door: --+$raven:29:Deep into that darkness peering, long I stood there wondering, fearing,+$raven:38:"Surely," said I, "surely that is something at my window lattice;+$raven:59:For we cannot help agreeing that no living human being+$raven:65:That one word, as if his soul in that one word he did outpour.+$raven:75:Till the dirges of his Hope that melancholy burden bore+$raven:88:On the cushion's velvet lining that the lamplight gloated o'er,+$raven:107:By that Heaven that bends above us, by that God we both adore,+$raven:113:"Be that word our sign of parting, bird or fiend!" I shrieked, upstarting:+$raven:115:Leave no black plume as a token of that lie thy soul hath spoken!+$raven:122:And his eyes have all the seeming of a demon's that is dreaming,+$raven:124:And my soul from out that shadow that lies floating on the floor EOF  my $perl = caret_X();-my @lhs_args = ( $perl, '-Mblib', build_ack_invocation( '--sort-files', '-g', 'of', 't/text' ) );-my @rhs_args = ( $perl, '-Mblib', build_ack_invocation( '-x', 'the' ) ); # for now+my @lhs_args = ( $perl, '-Mblib', build_ack_invocation( '--sort-files', '-g', '[vz]', 't/text' ) );+my @rhs_args = ( $perl, '-Mblib', build_ack_invocation( '-x', '-i', 'that' ) );  if ( $ENV{'ACK_TEST_STANDALONE'} ) {     @lhs_args = grep { $_ ne '-Mblib' } @lhs_args;

t/anchored.t

@@ -12,39 +12,66 @@ use Util;  prep_environment(); -my @files = qw( t/text );+my @files = qw( t/text/constitution.txt );  FRONT_ANCHORED: {-    my @args  = qw( --sort-files -h -i ^science );+    my @args  = qw( --sort-files -h -i ^congress );      my @expected = line_split( <<'EOF' );-Science and religion are not mutually exclusive+Congress prior to the Year one thousand eight hundred and eight, but EOF -    ack_lists_match( [ @args, @files ], \@expected, 'Looking for front-anchored "science"' );+    ack_lists_match( [ @args, @files ], \@expected, 'Looking for front-anchored "congress"' ); }  BACK_ANCHORED: {-    my @args  = qw( --sort-files -h -i done$ );+    my @args  = qw( --sort-files -h -i congress$ );      my @expected = line_split( <<'EOF' );-Through all kinds of weather and everything we done-And if it works, then it gets the job done+All legislative Powers herein granted shall be vested in a Congress+Fact, with such Exceptions, and under such Regulations as the Congress+Records, and judicial Proceedings of every other State. And the Congress EOF -    ack_sets_match( [ @args, @files ], \@expected, 'Looking for back-anchored "done"' );+    ack_sets_match( [ @args, @files ], \@expected, 'Looking for back-anchored "congress"' ); }  UNANCHORED: {-    my @args  = qw( --sort-files -h -i science );+    my @args  = qw( --sort-files -h -i congress );      my @expected = line_split( <<'EOF' );-Science and religion are not mutually exclusive-In fact, for better understanding we take the facts of science and apply them-    -- "The Science Of Myth", Screeching Weasel+All legislative Powers herein granted shall be vested in a Congress+the first Meeting of the Congress of the United States, and within+thereof; but the Congress may at any time by Law make or alter such+The Congress shall assemble at least once in every Year, and such+Neither House, during the Session of Congress, shall, without the Consent+a Law, in like Manner as if he had signed it, unless the Congress by+The Congress shall have Power To lay and collect Taxes, Duties, Imposts+the discipline prescribed by Congress;+particular States, and the Acceptance of Congress, become the Seat of+Congress prior to the Year one thousand eight hundred and eight, but+the Consent of the Congress, accept of any present, Emolument, Office,+No State shall, without the Consent of the Congress, lay any Imposts or+subject to the Revision and Control of the Congress.+No State shall, without the Consent of Congress, lay any Duty of Tonnage,+and Representatives to which the State may be entitled in the Congress:+The Congress may determine the Time of chusing the Electors, and the+Office, the Same shall devolve on the Vice President, and the Congress may+be established by Law: but the Congress may by Law vest the Appointment+He shall from time to time give to the Congress Information on the State+Court, and in such inferior Courts as the Congress may from time to+Fact, with such Exceptions, and under such Regulations as the Congress+shall be at such Place or Places as the Congress may by Law have directed.+The Congress shall have Power to declare the Punishment of Treason, but+Records, and judicial Proceedings of every other State. And the Congress+New States may be admitted by the Congress into this Union; but no new+concerned as well as of the Congress.+The Congress shall have Power to dispose of and make all needful Rules and+The Congress, whenever two thirds of both Houses shall deem it necessary,+Ratification may be proposed by the Congress; Provided that no Amendment EOF -    ack_lists_match( [ @args, @files ], \@expected, 'Looking for unanchored science' );+    ack_lists_match( [ @args, @files ], \@expected, 'Looking for unanchored congress' ); }  done_testing();

t/context.t

@@ -13,36 +13,33 @@ prep_environment(); # Checks also beginning of file. BEFORE: {     my @expected = line_split( <<'EOF' );-Well, my daddy left home when I was three+I met a traveller from an antique land ---But the meanest thing that he ever did-Was before he left, he went and named me Sue.+Stand in the desert... Near them, on the sand,+Half sunk, a shattered visage lies, whose frown, EOF -    my $regex = 'left';-    my @files = qw( t/text/boy-named-sue.txt );-    my @args = ( '-B1', $regex );+    my $regex = 'a';+    my @files = qw( t/text/ozymandias.txt );+    my @args = ( '-w', '-B1', $regex );      ack_lists_match( [ @args, @files ], \@expected, "Looking for $regex - before" ); } -BEFORE_WITH_LINENO: {-    my $target_file = reslash( 't/text/boy-named-sue.txt' );+BEFORE_WITH_LINE_NO: {+    my $target_file = reslash( 't/text/ozymandias.txt' );     my @expected = line_split( <<"EOF" );-$target_file-7--$target_file-8-Well, he must have thought that it was quite a joke-$target_file:9:And it got a lot of laughs from a' lots of folks,-$target_file-10-It seems I had to fight my whole life through.-$target_file-11-Some gal would giggle and I'd turn red-$target_file:12:And some guy'd laugh and I'd bust his head,+$target_file-1-I met a traveller from an antique land+$target_file-2-Who said: Two vast and trunkless legs of stone+$target_file:3:Stand in the desert... Near them, on the sand, ---$target_file-44-But I really can't remember when,-$target_file-45-He kicked like a mule and he bit like a crocodile.-$target_file:46:I heard him laugh and then I heard him cuss,+$target_file-12-Nothing beside remains. Round the decay+$target_file-13-Of that colossal wreck, boundless and bare+$target_file:14:The lone and level sands stretch far away. EOF -    my $regex = 'laugh';-    my @files = qw( t/text );+    my $regex = 'sand';+    my @files = qw( t/text/ozymandias.txt t/text/bill-of-rights.txt );  # So we don't pick up constitution.txt     my @args = ( '--sort-files', '-B2', $regex );      ack_lists_match( [ @args, @files ], \@expected, "Looking for $regex - before with line numbers" );@@ -51,15 +48,11 @@ EOF # Checks also end of file. AFTER: {     my @expected = line_split( <<'EOF' );-I tell ya, life ain't easy for a boy named Sue.--Well, I grew up quick and I grew up mean,----    -- "A Boy Named Sue", Johnny Cash+The lone and level sands stretch far away. EOF -    my $regex = '[nN]amed Sue';-    my @files = qw( t/text/boy-named-sue.txt );+    my $regex = 'sands';+    my @files = qw( t/text/ozymandias.txt );     my @args = ( '-A2', $regex );      ack_lists_match( [ @args, @files ], \@expected, "Looking for $regex - after" );@@ -68,16 +61,16 @@ EOF # Context defaults to 2. CONTEXT_DEFAULT: {     my @expected = line_split( <<'EOF' );-And it got a lot of laughs from a' lots of folks,-It seems I had to fight my whole life through.-Some gal would giggle and I'd turn red-And some guy'd laugh and I'd bust his head,-I tell ya, life ain't easy for a boy named Sue.+"Yes,"I said, "let us be gone."++"For the love of God, Montresor!"++"Yes," I said, "for the love of God!" EOF -    my $regex = 'giggle';-    my @files = qw( t/text/boy-named-sue.txt );-    my @args = ( '-C', $regex );+    my $regex = 'Montresor';+    my @files = qw( t/text/amontillado.txt );+    my @args = ( '-w', '-C', $regex );      ack_lists_match( [ @args, @files ], \@expected, "Looking for $regex - context defaults to 2" ); }@@ -85,14 +78,15 @@ EOF # Try context 1. CONTEXT_ONE: {     my @expected = line_split( <<'EOF' );-It seems I had to fight my whole life through.-Some gal would giggle and I'd turn red-And some guy'd laugh and I'd bust his head,++"For the love of God, Montresor!" EOF -    my $regex = 'giggle';-    my @files = qw( t/text/boy-named-sue.txt );-    my @args = ( '-C', 1, $regex );+    push( @expected, '' );  # Since split eats the last line.++    my $regex = 'Montresor';+    my @files = qw( t/text/amontillado.txt );+    my @args = ( '-w', '-C', 1, $regex );      ack_lists_match( [ @args, @files ], \@expected, "Looking for $regex - context=1" ); }@@ -100,12 +94,12 @@ EOF # --context=0 means no context. CONTEXT_ONE: {     my @expected = line_split( <<'EOF' );-Some gal would giggle and I'd turn red+"For the love of God, Montresor!" EOF -    my $regex = 'giggle';-    my @files = qw( t/text/boy-named-sue.txt );-    my @args = ( '-C', 0, $regex );+    my $regex = 'Montresor';+    my @files = qw( t/text/amontillado.txt );+    my @args = ( '-w', '-C', 0, $regex );      ack_lists_match( [ @args, @files ], \@expected, "Looking for $regex - context=0" ); }@@ -113,16 +107,14 @@ EOF # -1 must not stop the ending context from displaying. CONTEXT_DEFAULT: {     my @expected = line_split( <<'EOF' );-And it got a lot of laughs from a' lots of folks,-It seems I had to fight my whole life through.-Some gal would giggle and I'd turn red-And some guy'd laugh and I'd bust his head,-I tell ya, life ain't easy for a boy named Sue.+or prohibiting the free exercise thereof; or abridging the freedom of+speech, or of the press; or the right of the people peaceably to assemble,+and to petition the Government for a redress of grievances. EOF -    my $regex = 'giggle';-    my @files = qw( t/text/boy-named-sue.txt );-    my @args = ( '-1', '-C', $regex );+    my $regex = 'right';+    my @files = qw( t/text/bill-of-rights.txt );+    my @args = ( '-1', '-C1', $regex );      ack_lists_match( [ @args, @files ], \@expected, "Looking for $regex with -1" ); }@@ -251,37 +243,33 @@ EOF  # -m3 should work properly and show only 3 matches with correct context #    even though there is a 4th match in the after context of the third match-#    ("give _ya_ that name" in the last line)+#    ("ratifying" in the last line) CONTEXT_MAX_COUNT: {     my @expected = line_split( <<'EOF' );-And some guy'd laugh and I'd bust his head,-I tell ya, life ain't easy for a boy named Sue.-+ratified by the Legislatures of three fourths of the several States, or+by Conventions in three fourths thereof, as the one or the other Mode of+Ratification may be proposed by the Congress; Provided that no Amendment+which may be made prior to the Year One thousand eight hundred and eight ----I tell ya, I've fought tougher men-But I really can't remember when,----And if a man's gonna make it, he's gotta be tough-And I knew I wouldn't be there to help ya along.-So I give ya that name and I said goodbye+The Ratification of the Conventions of nine States, shall be sufficient+for the Establishment of this Constitution between the States so ratifying EOF -    my $regex = 'ya';+    my $regex = 'ratif'; -    my @files = qw( t/text/boy-named-sue.txt );-    my @args = ( '-m3', '-C1', $regex );+    my @files = qw( t/text/constitution.txt );+    my @args = ( '-i', '-m3', '-A1', $regex );      ack_lists_match( [ @args, @files ], \@expected, "Looking for $regex with -m3" ); }  # Highlighting works with context. HIGHLIGHTING: {-    my @ack_args = qw( July -C5 --color );-    my @results = pipe_into_ack( 't/text/4th-of-july.txt', @ack_args );+    my @ack_args = qw( wretch -i -C5 --color );+    my @results = pipe_into_ack( 't/text/raven.txt', @ack_args );     my @escaped_lines = grep { /\e/ } @results;-    is( scalar @escaped_lines, 2, 'Only two lines are highlighted' );-    is( scalar @results, 18, 'Expecting altogether 18 lines back' );+    is( scalar @escaped_lines, 1, 'Only one line highlighted' );+    is( scalar @results, 11, 'Expecting altogether 11 lines back' ); }  # Grouping works with context (single file).@@ -302,33 +290,23 @@ EOF # Grouping works with context and multiple files. # i.e. a separator line between different matches in the same file and no separator between files GROUPING_MULTIPLE_FILES: {-    my @target_file = map { reslash($_) } qw(-        t/text/boy-named-sue.txt-        t/text/me-and-bobbie-mcgee.txt-        t/text/science-of-myth.txt-    );     my @expected = line_split( <<"EOF" );-$target_file[0]-1:Well, my daddy left home when I was three----5-But the meanest thing that he ever did-6:Was before he left, he went and named me Sue.+t/text/amontillado.txt+258-As I said these words I busied myself among the pile of bones of+259:which I have before spoken. Throwing them aside, I soon uncovered -$target_file[1]-10--11:    Freedom's just another word for nothing left to lose+t/text/raven.txt+31-But the silence was unbroken, and the stillness gave no token,+32:And the only word there spoken was the whispered word, "Lenore?" ---25--26:    Freedom's just another word for nothing left to lose--$target_file[2]-18-Consider the case of the woman whose faith helped her make it through-19:When she was raped and cut up, left for dead in her trunk, her beliefs held true-20-It doesn't matter if it's real or not-21:'cause some things are better left without a doubt+70-+71:Startled at the stillness broken by reply so aptly spoken,+--+114-"Get thee back into the tempest and the Night's Plutonian shore!+115:Leave no black plume as a token of that lie thy soul hath spoken! EOF -    my $regex = 'left';+    my $regex = 'spoken';     my @files = qw( t/text/ );     my @args = ( '--group', '-B1', '--sort-files', $regex ); @@ -337,51 +315,31 @@ EOF  # See https://github.com/beyondgrep/ack2/issues/326 and links there for details. WITH_COLUMNS_AND_CONTEXT: {-    my @files = qw( t/text/freedom-of-choice.txt );-    my @expected = line_split( <<"EOF" );-$files[0]-2-Nobody ever said life was free-$files[0]-3-Sink, swim, go down with the ship-$files[0]:4:15:But use your freedom of choice-$files[0]-5--$files[0]-6-I'll say it again in the land of the free-$files[0]:7:11:Use your freedom of choice-$files[0]:8:7:Your freedom of choice-$files[0]-9--$files[0]-10-In ancient Rome----$files[0]-17-He dropped dead-$files[0]-18--$files[0]:19:2:Freedom of choice-$files[0]-20-Is what you got-$files[0]:21:2:Freedom of choice!-$files[0]-22--$files[0]-23-Then if you've got it, you don't want it----$files[0]-27--$files[0]-28-I'll say it again in the land of the free-$files[0]:29:11:Use your freedom of choice-$files[0]:30:2:Freedom of choice-$files[0]-31--$files[0]:32:2:Freedom of choice-$files[0]-33-Is what you got-$files[0]:34:2:Freedom of choice!-$files[0]-35--$files[0]-36-In ancient Rome+    my @files = qw( t/text/ );+    my @expected = line_split( <<'EOF' );+t/text/bill-of-rights.txt-1-# Amendment I+t/text/bill-of-rights.txt-2-+t/text/bill-of-rights.txt-3-Congress shall make no law respecting an establishment of religion,+t/text/bill-of-rights.txt:4:60:or prohibiting the free exercise thereof; or abridging the freedom of+t/text/bill-of-rights.txt-5-speech, or of the press; or the right of the people peaceably to assemble,+t/text/bill-of-rights.txt-6-and to petition the Government for a redress of grievances.+t/text/bill-of-rights.txt-7-+t/text/bill-of-rights.txt-8-# Amendment II+t/text/bill-of-rights.txt-9- ---$files[0]-43-He dropped dead-$files[0]-44--$files[0]:45:2:Freedom of choice-$files[0]-46-Is what you got-$files[0]:47:2:Freedom from choice-$files[0]-48-Is what you want-$files[0]-49--$files[0]:50:10:    -- "Freedom Of Choice", Devo+t/text/gettysburg.txt-18-fought here have thus far so nobly advanced. It is rather for us to be+t/text/gettysburg.txt-19-here dedicated to the great task remaining before us -- that from these+t/text/gettysburg.txt-20-honored dead we take increased devotion to that cause for which they gave+t/text/gettysburg.txt-21-the last full measure of devotion -- that we here highly resolve that+t/text/gettysburg.txt-22-these dead shall not have died in vain -- that this nation, under God,+t/text/gettysburg.txt:23:27:shall have a new birth of freedom -- and that government of the people,+t/text/gettysburg.txt-24-by the people, for the people, shall not perish from the earth. EOF -    my $regex = 'reedom';-    my @args = ( '--column', '-C2', '-H', $regex );+    my $regex = 'freedom';+    my @args = ( '--column', '-C5', '-H', '--sort-files', $regex ); -    ack_lists_match( [ @args, @files ], \@expected, "Looking for $regex in file $files[0] with columns and context" );+    ack_lists_match( [ @args, @files ], \@expected, "Looking for $regex" ); }  done_testing();

t/exit-code.t

@@ -9,8 +9,8 @@ use Util;  prep_environment(); -run_ack( 'boy', 't/text/boy-named-sue.txt' );+run_ack( 'legislative', 't/text/constitution.txt' ); is( get_rc(), 0, 'Exit code with matches should be 0' ); -run_ack( 'foo', 't/text/boy-named-sue.txt' );+run_ack( 'foo', 't/text/constitution.txt' ); is( get_rc(), 1, 'Exit code with no matches should be 1' );

t/highlighting.t

@@ -15,12 +15,13 @@ prep_environment(); my @HIGHLIGHT = qw( --color --group --sort-files );  BASIC: {-    my @args  = qw( --sort-files beliefs t/text/ );+    my @args  = qw( --sort-files Montresor t/text/ );      my $expected_original = <<'END';-<t/text/science-of-myth.txt>-{1}:If you've ever questioned (beliefs) that you've hold, you're not alone-{19}:When she was raped and cut up, left for dead in her trunk, her (beliefs) held true+<t/text/amontillado.txt>+{99}:the catacombs of the (Montresor)s.+{152}:"The (Montresor)s," I replied, "were a great and numerous family."+{309}:"For the love of God, (Montresor)!" END      $expected_original = windows_slashify( $expected_original ) if is_windows;@@ -34,17 +35,17 @@ END   METACHARACTERS: {-    my @args  = qw( --sort-files \w*din\w* t/text/ );+    my @args  = qw( --sort-files \w*rave\w* t/text/ );     my $expected_original = <<'END';-<t/text/4th-of-july.txt>-{24}:(Riding) shotgun from town to town+<t/text/gettysburg.txt>+{13}:we can not hallow -- this ground. The (brave) men, living and dead, who -<t/text/me-and-bobbie-mcgee.txt>-{8}:(Holdin)' Bobbie's hand in mine-{24}:To be (holding) Bobbie's body next to mine+<t/text/ozymandias.txt>+{1}:I met a (traveller) from an antique land -<t/text/science-of-myth.txt>-{14}:In fact, for better (understanding) we take the facts of science and apply them+<t/text/raven.txt>+{51}:By the (grave) and stern decorum of the countenance it wore,+{52}:"Though thy crest be shorn and shaven, thou," I said, "art sure no (craven), END      $expected_original = windows_slashify( $expected_original ) if is_windows;@@ -58,18 +59,27 @@ END   CONTEXT: {-    my @args  = qw( --sort-files love -C1 t/text/ );+    my @args  = qw( --sort-files free -C1 t/text/ );      my $expected_original = <<'END';-<t/text/4th-of-july.txt>-{11}-You were pretty as can be, sitting in the front seat-{12}:Looking at me, telling me you (love) me,-{13}-And you're happy to be with me on the 4th of July--<t/text/shut-up-be-happy.txt>-{4}-Stay in your homes.-{5}:Do not attempt to contact (love)d ones, insurance agents or attorneys.-{6}-Shut up.+<t/text/bill-of-rights.txt>+{3}-Congress shall make no law respecting an establishment of religion,+{4}:or prohibiting the (free) exercise thereof; or abridging the (free)dom of+{5}-speech, or of the press; or the right of the people peaceably to assemble,+--+{9}-+{10}:A well regulated Militia, being necessary to the security of a (free) State,+{11}-the right of the people to keep and bear Arms, shall not be infringed.++<t/text/constitution.txt>+{31}-respective Numbers, which shall be determined by adding to the whole+{32}:Number of (free) Persons, including those bound to Service for a Term+{33}-of Years, and excluding Indians not taxed, three fifths of all other++<t/text/gettysburg.txt>+{22}-these dead shall not have died in vain -- that this nation, under God,+{23}:shall have a new birth of (free)dom -- and that government of the people,+{24}-by the people, for the people, shall not perish from the earth. END      $expected_original = windows_slashify( $expected_original ) if is_windows;

t/incomplete-last-line.t

@@ -3,7 +3,7 @@ use warnings; use strict; -use Test::More tests => 1;+use Test::More tests => 4;  use lib 't'; use Util;@@ -12,14 +12,28 @@ prep_environment();  # Check that a match on the last line of a file without a proper # ending newline gets this newline appended by ack.+++VERIFY_LAST_LINE_IS_MISSING_NEWLINE: {+    # Verify that our test data file is set up the way we expect and that it hasn't had a newline+    # added to the end of the file by mistake.+    open( my $fh, '<', 't/swamp/incomplete-last-line.txt' ) or die $!;+    my @lines = <$fh>;+    close $fh;+    is( substr( $lines[0], -1, 1 ), "\n", 'First line ends with a newline' );+    is( substr( $lines[1], -1, 1 ), "\n", 'Second line ends with a newline' );+    is( substr( $lines[2], -1, 1 ), '!', 'Third line ends with a bang, not a newline' );+}++ INCOMPLETE_LAST_LINE: {     my @expected = line_split( <<'EOF' ); but no new line on the last line!-At last everything is done for you.+the last full measure of devotion -- that we here highly resolve that EOF      my @args  = qw( -h --nogroup last );-    my @files = qw( t/swamp/incomplete-last-line.txt t/text/shut-up-be-happy.txt );+    my @files = qw( t/swamp/incomplete-last-line.txt t/text/gettysburg.txt );      ack_lists_match( [ @args, @files ], \@expected, 'Incomplete line gets a newline appended.' ); }

t/interactive.t

@@ -19,59 +19,54 @@ plan tests => 6; prep_environment();  INTERACTIVE_GROUPING_NOCOLOR: {-    my @args  = qw( Sue --nocolor --sort-files );+    my @args  = qw( free --nocolor --sort-files );     my @files = qw( t/text );      my $output = run_ack_interactive(@args, @files);      is $output, <<'END_OUTPUT';-t/text/boy-named-sue.txt-6:Was before he left, he went and named me Sue.-13:I tell ya, life ain't easy for a boy named Sue.-27:Sat the dirty, mangy dog that named me Sue.-34:And I said: "My name is Sue! How do you do! Now you gonna die!"-62:Cause I'm the son-of-a-bitch that named you Sue."-70:Bill or George! Anything but Sue! I still hate that name!-72:    -- "A Boy Named Sue", Johnny Cash+t/text/bill-of-rights.txt+4:or prohibiting the free exercise thereof; or abridging the freedom of+10:A well regulated Militia, being necessary to the security of a free State,++t/text/constitution.txt+32:Number of free Persons, including those bound to Service for a Term++t/text/gettysburg.txt+23:shall have a new birth of freedom -- and that government of the people, END_OUTPUT }  INTERACTIVE_NOHEADING_NOCOLOR: {-    my @args  = qw( Sue --nocolor --noheading --sort-files );+    my @args  = qw( free --nocolor --noheading --sort-files );     my @files = qw( t/text );      my $output = run_ack_interactive(@args, @files);      is $output, <<'END_OUTPUT';-t/text/boy-named-sue.txt:6:Was before he left, he went and named me Sue.-t/text/boy-named-sue.txt:13:I tell ya, life ain't easy for a boy named Sue.-t/text/boy-named-sue.txt:27:Sat the dirty, mangy dog that named me Sue.-t/text/boy-named-sue.txt:34:And I said: "My name is Sue! How do you do! Now you gonna die!"-t/text/boy-named-sue.txt:62:Cause I'm the son-of-a-bitch that named you Sue."-t/text/boy-named-sue.txt:70:Bill or George! Anything but Sue! I still hate that name!-t/text/boy-named-sue.txt:72:    -- "A Boy Named Sue", Johnny Cash+t/text/bill-of-rights.txt:4:or prohibiting the free exercise thereof; or abridging the freedom of+t/text/bill-of-rights.txt:10:A well regulated Militia, being necessary to the security of a free State,+t/text/constitution.txt:32:Number of free Persons, including those bound to Service for a Term+t/text/gettysburg.txt:23:shall have a new birth of freedom -- and that government of the people, END_OUTPUT }  INTERACTIVE_NOGROUP_NOCOLOR: {-    my @args  = qw( Sue --nocolor --nogroup --sort-files );+    my @args  = qw( free --nocolor --nogroup --sort-files );     my @files = qw( t/text );      my $output = run_ack_interactive(@args, @files);      is $output, <<'END_OUTPUT';-t/text/boy-named-sue.txt:6:Was before he left, he went and named me Sue.-t/text/boy-named-sue.txt:13:I tell ya, life ain't easy for a boy named Sue.-t/text/boy-named-sue.txt:27:Sat the dirty, mangy dog that named me Sue.-t/text/boy-named-sue.txt:34:And I said: "My name is Sue! How do you do! Now you gonna die!"-t/text/boy-named-sue.txt:62:Cause I'm the son-of-a-bitch that named you Sue."-t/text/boy-named-sue.txt:70:Bill or George! Anything but Sue! I still hate that name!-t/text/boy-named-sue.txt:72:    -- "A Boy Named Sue", Johnny Cash+t/text/bill-of-rights.txt:4:or prohibiting the free exercise thereof; or abridging the freedom of+t/text/bill-of-rights.txt:10:A well regulated Militia, being necessary to the security of a free State,+t/text/constitution.txt:32:Number of free Persons, including those bound to Service for a Term+t/text/gettysburg.txt:23:shall have a new birth of freedom -- and that government of the people, END_OUTPUT }  INTERACTIVE_GROUPING_COLOR: {-    my @args  = qw( Sue --sort-files ); # --color is on by default+    my @args  = qw( free --sort-files ); # --color is on by default     my @files = qw( t/text );      my $CFN      = color 'bold green';@@ -80,16 +75,17 @@ INTERACTIVE_GROUPING_COLOR: {     my $CM       = color 'black on_yellow';     my $LINE_END = "\e[0m\e[K"; -    my @expected_lines = (-        qq{${CFN}t/text/boy-named-sue.txt$CRESET},-        qq{${CLN}6${CRESET}:Was before he left, he went and named me ${CM}Sue${CRESET}.$LINE_END},-        qq{${CLN}13${CRESET}:I tell ya, life ain't easy for a boy named ${CM}Sue${CRESET}.$LINE_END},-        qq{${CLN}27${CRESET}:Sat the dirty, mangy dog that named me ${CM}Sue${CRESET}.$LINE_END},-        qq{${CLN}34${CRESET}:And I said: "My name is ${CM}Sue${CRESET}! How do you do! Now you gonna die!"$LINE_END},-        qq{${CLN}62${CRESET}:Cause I'm the son-of-a-bitch that named you ${CM}Sue${CRESET}."$LINE_END},-        qq{${CLN}70${CRESET}:Bill or George! Anything but ${CM}Sue${CRESET}! I still hate that name!$LINE_END},-        qq{${CLN}72${CRESET}:    -- "A Boy Named ${CM}Sue${CRESET}", Johnny Cash$LINE_END},-    );+    my @expected_lines = split( /\n/, <<"EOF" );+${CFN}t/text/bill-of-rights.txt${CRESET}+${CLN}4${CRESET}:or prohibiting the ${CM}free${CRESET} exercise thereof; or abridging the ${CM}free${CRESET}dom of$LINE_END+${CLN}10${CRESET}:A well regulated Militia, being necessary to the security of a ${CM}free${CRESET} State,$LINE_END++${CFN}t/text/constitution.txt${CRESET}+${CLN}32${CRESET}:Number of ${CM}free${CRESET} Persons, including those bound to Service for a Term$LINE_END++${CFN}t/text/gettysburg.txt${CRESET}+${CLN}23${CRESET}:shall have a new birth of ${CM}free${CRESET}dom -- and that government of the people,$LINE_END+EOF      my @lines = run_ack_interactive(@args, @files); @@ -97,35 +93,43 @@ INTERACTIVE_GROUPING_COLOR: { }  INTERACTIVE_SINGLE_TARGET: {-    my @args  = qw( Sue --nocolor );-    my @files = qw( t/text/boy-named-sue.txt );+    my @args = qw( (nevermore) -i --nocolor );+    my @files = qw( t/text/raven.txt );      my $output = run_ack_interactive(@args, @files);      is $output, <<'END_OUTPUT';-Was before he left, he went and named me Sue.-I tell ya, life ain't easy for a boy named Sue.-Sat the dirty, mangy dog that named me Sue.-And I said: "My name is Sue! How do you do! Now you gonna die!"-Cause I'm the son-of-a-bitch that named you Sue."-Bill or George! Anything but Sue! I still hate that name!-    -- "A Boy Named Sue", Johnny Cash+    Quoth the Raven, "Nevermore."+    With such name as "Nevermore."+    Then the bird said, "Nevermore."+    Of 'Never -- nevermore.'+    Meant in croaking "Nevermore."+    She shall press, ah, nevermore!+    Quoth the Raven, "Nevermore."+    Quoth the Raven, "Nevermore."+    Quoth the Raven, "Nevermore."+    Quoth the Raven, "Nevermore."+    Shall be lifted--nevermore! END_OUTPUT }  INTERACTIVE_NOCOLOR_REGEXP_CAPTURE: {-    my @args = qw( (Sue) --nocolor );-    my @files = qw( t/text/boy-named-sue.txt );+    my @args = qw( (nevermore) -i --nocolor );+    my @files = qw( t/text/raven.txt );      my $output = run_ack_interactive(@args, @files);      is $output, <<'END_OUTPUT';-Was before he left, he went and named me Sue.-I tell ya, life ain't easy for a boy named Sue.-Sat the dirty, mangy dog that named me Sue.-And I said: "My name is Sue! How do you do! Now you gonna die!"-Cause I'm the son-of-a-bitch that named you Sue."-Bill or George! Anything but Sue! I still hate that name!-    -- "A Boy Named Sue", Johnny Cash+    Quoth the Raven, "Nevermore."+    With such name as "Nevermore."+    Then the bird said, "Nevermore."+    Of 'Never -- nevermore.'+    Meant in croaking "Nevermore."+    She shall press, ah, nevermore!+    Quoth the Raven, "Nevermore."+    Quoth the Raven, "Nevermore."+    Quoth the Raven, "Nevermore."+    Quoth the Raven, "Nevermore."+    Shall be lifted--nevermore! END_OUTPUT }

t/mutex-options.t

@@ -9,290 +9,295 @@ use Util;  prep_environment(); +## no critic ( ValuesAndExpressions::RequireInterpolationOfMetachars ) Way too many metacharacters in this file++my $file = 't/text/raven.txt';+my $word = 'nevermore';+ # --line-are_mutually_exclusive('--line', '-l', ['--line=1', '-l', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-l', ['--line', 1, '-l', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--files-with-matches', ['--line=1', '--files-with-matches', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--files-with-matches', ['--line', 1, '--files-with-matches', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-L', ['--line=1', '-L', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-L', ['--line', 1, '-L', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--files-without-matches', ['--line=1', '--files-without-matches', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--files-without-matches', ['--line', 1, '--files-without-matches', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-o', ['--line=1', '-o', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-o', ['--line', 1, '-o', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--passthru', ['--line=1', '--passthru', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--passthru', ['--line', 1, '--passthru', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--match', ['--line=1', '--match', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--match', ['--line', 1, '--match', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-m', ['--line=1', '-m', 1, 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-m', ['--line', 1, '-m', 1, 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-m', ['--line', 1, '-m1', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--max-count', ['--line=1', '--max-count', 1, 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--max-count', ['--line', 1, '--max-count', 1, 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--max-count', ['--line=1', '--max-count=1', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--max-count', ['--line', 1, '--max-count=1', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-1', ['--line=1', '-1', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-1', ['--line', 1, '-1', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-H', ['--line=1', '-H', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-H', ['--line', 1, '-H', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--with-filename', ['--line=1', '--with-filename', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--with-filename', ['--line', 1, '--with-filename', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-h', ['--line=1', '-h', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-h', ['--line', 1, '-h', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--no-filename', ['--line=1', '--no-filename', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--no-filename', ['--line', 1, '--no-filename', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-c', ['--line=1', '-c', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-c', ['--line', 1, '-c', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--count', ['--line=1', '--count', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--count', ['--line', 1, '--count', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--column', ['--line=1', '--column', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--column', ['--line', 1, '--column', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-A', ['--line=1', '-A', 1, 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-A', ['--line', 1, '-A', 1, 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--after-context', ['--line=1', '--after-context', 1, 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--after-context', ['--line', 1, '--after-context', 1, 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--after-context', ['--line=1', '--after-context=1', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--after-context', ['--line', 1, '--after-context=1', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-B', ['--line=1', '-B', 1, 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-B', ['--line', 1, '-B', 1, 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--before-context', ['--line=1', '--before-context', 1, 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--before-context', ['--line', 1, '--before-context', 1, 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--before-context', ['--line=1', '--before-context=1', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--before-context', ['--line', 1, '--before-context=1', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-C', ['--line=1', '-C', 1, 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-C', ['--line', 1, '-C', 1, 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--context', ['--line=1', '--context', 1, 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--context', ['--line', 1, '--context', 1, 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--context', ['--line=1', '--context=1', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--context', ['--line', 1, '--context=1', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--print0', ['--line=1', '--print0', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--print0', ['--line', 1, '--print0', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-f', ['--line=1', '-f', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-f', ['--line', 1, '-f', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-g', ['--line=1', '-g', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '-g', ['--line', 1, '-g', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--show-types', ['--line=1', '--show-types', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--line', '--show-types', ['--line', 1, '--show-types', 't/text/science-of-myth.txt']);+are_mutually_exclusive('--line', '-l', ['--line=1', '-l', $file]);+are_mutually_exclusive('--line', '-l', ['--line', 1, '-l', $file]);+are_mutually_exclusive('--line', '--files-with-matches', ['--line=1', '--files-with-matches', $file]);+are_mutually_exclusive('--line', '--files-with-matches', ['--line', 1, '--files-with-matches', $file]);+are_mutually_exclusive('--line', '-L', ['--line=1', '-L', $file]);+are_mutually_exclusive('--line', '-L', ['--line', 1, '-L', $file]);+are_mutually_exclusive('--line', '--files-without-matches', ['--line=1', '--files-without-matches', $file]);+are_mutually_exclusive('--line', '--files-without-matches', ['--line', 1, '--files-without-matches', $file]);+are_mutually_exclusive('--line', '-o', ['--line=1', '-o', $file]);+are_mutually_exclusive('--line', '-o', ['--line', 1, '-o', $file]);+are_mutually_exclusive('--line', '--passthru', ['--line=1', '--passthru', $file]);+are_mutually_exclusive('--line', '--passthru', ['--line', 1, '--passthru', $file]);+are_mutually_exclusive('--line', '--match', ['--line=1', '--match', $file]);+are_mutually_exclusive('--line', '--match', ['--line', 1, '--match', $file]);+are_mutually_exclusive('--line', '-m', ['--line=1', '-m', 1, $file]);+are_mutually_exclusive('--line', '-m', ['--line', 1, '-m', 1, $file]);+are_mutually_exclusive('--line', '-m', ['--line', 1, '-m1', $file]);+are_mutually_exclusive('--line', '--max-count', ['--line=1', '--max-count', 1, $file]);+are_mutually_exclusive('--line', '--max-count', ['--line', 1, '--max-count', 1, $file]);+are_mutually_exclusive('--line', '--max-count', ['--line=1', '--max-count=1', $file]);+are_mutually_exclusive('--line', '--max-count', ['--line', 1, '--max-count=1', $file]);+are_mutually_exclusive('--line', '-1', ['--line=1', '-1', $file]);+are_mutually_exclusive('--line', '-1', ['--line', 1, '-1', $file]);+are_mutually_exclusive('--line', '-H', ['--line=1', '-H', $file]);+are_mutually_exclusive('--line', '-H', ['--line', 1, '-H', $file]);+are_mutually_exclusive('--line', '--with-filename', ['--line=1', '--with-filename', $file]);+are_mutually_exclusive('--line', '--with-filename', ['--line', 1, '--with-filename', $file]);+are_mutually_exclusive('--line', '-h', ['--line=1', '-h', $file]);+are_mutually_exclusive('--line', '-h', ['--line', 1, '-h', $file]);+are_mutually_exclusive('--line', '--no-filename', ['--line=1', '--no-filename', $file]);+are_mutually_exclusive('--line', '--no-filename', ['--line', 1, '--no-filename', $file]);+are_mutually_exclusive('--line', '-c', ['--line=1', '-c', $file]);+are_mutually_exclusive('--line', '-c', ['--line', 1, '-c', $file]);+are_mutually_exclusive('--line', '--count', ['--line=1', '--count', $file]);+are_mutually_exclusive('--line', '--count', ['--line', 1, '--count', $file]);+are_mutually_exclusive('--line', '--column', ['--line=1', '--column', $file]);+are_mutually_exclusive('--line', '--column', ['--line', 1, '--column', $file]);+are_mutually_exclusive('--line', '-A', ['--line=1', '-A', 1, $file]);+are_mutually_exclusive('--line', '-A', ['--line', 1, '-A', 1, $file]);+are_mutually_exclusive('--line', '--after-context', ['--line=1', '--after-context', 1, $file]);+are_mutually_exclusive('--line', '--after-context', ['--line', 1, '--after-context', 1, $file]);+are_mutually_exclusive('--line', '--after-context', ['--line=1', '--after-context=1', $file]);+are_mutually_exclusive('--line', '--after-context', ['--line', 1, '--after-context=1', $file]);+are_mutually_exclusive('--line', '-B', ['--line=1', '-B', 1, $file]);+are_mutually_exclusive('--line', '-B', ['--line', 1, '-B', 1, $file]);+are_mutually_exclusive('--line', '--before-context', ['--line=1', '--before-context', 1, $file]);+are_mutually_exclusive('--line', '--before-context', ['--line', 1, '--before-context', 1, $file]);+are_mutually_exclusive('--line', '--before-context', ['--line=1', '--before-context=1', $file]);+are_mutually_exclusive('--line', '--before-context', ['--line', 1, '--before-context=1', $file]);+are_mutually_exclusive('--line', '-C', ['--line=1', '-C', 1, $file]);+are_mutually_exclusive('--line', '-C', ['--line', 1, '-C', 1, $file]);+are_mutually_exclusive('--line', '--context', ['--line=1', '--context', 1, $file]);+are_mutually_exclusive('--line', '--context', ['--line', 1, '--context', 1, $file]);+are_mutually_exclusive('--line', '--context', ['--line=1', '--context=1', $file]);+are_mutually_exclusive('--line', '--context', ['--line', 1, '--context=1', $file]);+are_mutually_exclusive('--line', '--print0', ['--line=1', '--print0', $file]);+are_mutually_exclusive('--line', '--print0', ['--line', 1, '--print0', $file]);+are_mutually_exclusive('--line', '-f', ['--line=1', '-f', $file]);+are_mutually_exclusive('--line', '-f', ['--line', 1, '-f', $file]);+are_mutually_exclusive('--line', '-g', ['--line=1', '-g', $file]);+are_mutually_exclusive('--line', '-g', ['--line', 1, '-g', $file]);+are_mutually_exclusive('--line', '--show-types', ['--line=1', '--show-types', $file]);+are_mutually_exclusive('--line', '--show-types', ['--line', 1, '--show-types', $file]);  # -l/--files-with-matches-are_mutually_exclusive('-l', '-L', ['-l', '-L', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '-o', ['-l', '-o', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '--passthru', ['-l', '--passthru', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '--output', ['-l', '--output', '$&', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '--output', ['-l', '--output=$&', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '--max-count', ['-l', '--max-count', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '--max-count', ['-l', '--max-count=1', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '-h', ['-l', '-h', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '--with-filename', ['-l', '--with-filename', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '--no-filename', ['-l', '--no-filename', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '--column', ['-l', '--column', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '-A', ['-l', '-A', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '--after-context', ['-l', '--after-context', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '--after-context', ['-l', '--after-context=1', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '-B', ['-l', '-B', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '--before-context', ['-l', '--before-context', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '--before-context', ['-l', '--before-context=1', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '-C', ['-l', '-C', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '--context', ['-l', '--context', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '--context', ['-l', '--context=1', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '--heading', ['-l', '--heading', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '--break', ['-l', '--break', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '--group', ['-l', '--group', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '-f', ['-l', '-f', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '-g', ['-l', '-g', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-l', '--show-types', ['-l', '--show-types', 'science', 't/text/science-of-myth.txt']);+are_mutually_exclusive('-l', '-L', ['-l', '-L', $word, $file]);+are_mutually_exclusive('-l', '-o', ['-l', '-o', $word, $file]);+are_mutually_exclusive('-l', '--passthru', ['-l', '--passthru', $word, $file]);+are_mutually_exclusive('-l', '--output', ['-l', '--output', '$&', $word, $file]);+are_mutually_exclusive('-l', '--output', ['-l', '--output=$&', $word, $file]);+are_mutually_exclusive('-l', '--max-count', ['-l', '--max-count', 1, $word, $file]);+are_mutually_exclusive('-l', '--max-count', ['-l', '--max-count=1', $word, $file]);+are_mutually_exclusive('-l', '-h', ['-l', '-h', $word, $file]);+are_mutually_exclusive('-l', '--with-filename', ['-l', '--with-filename', $word, $file]);+are_mutually_exclusive('-l', '--no-filename', ['-l', '--no-filename', $word, $file]);+are_mutually_exclusive('-l', '--column', ['-l', '--column', $word, $file]);+are_mutually_exclusive('-l', '-A', ['-l', '-A', 1, $word, $file]);+are_mutually_exclusive('-l', '--after-context', ['-l', '--after-context', 1, $word, $file]);+are_mutually_exclusive('-l', '--after-context', ['-l', '--after-context=1', $word, $file]);+are_mutually_exclusive('-l', '-B', ['-l', '-B', 1, $word, $file]);+are_mutually_exclusive('-l', '--before-context', ['-l', '--before-context', 1, $word, $file]);+are_mutually_exclusive('-l', '--before-context', ['-l', '--before-context=1', $word, $file]);+are_mutually_exclusive('-l', '-C', ['-l', '-C', 1, $word, $file]);+are_mutually_exclusive('-l', '--context', ['-l', '--context', 1, $word, $file]);+are_mutually_exclusive('-l', '--context', ['-l', '--context=1', $word, $file]);+are_mutually_exclusive('-l', '--heading', ['-l', '--heading', $word, $file]);+are_mutually_exclusive('-l', '--break', ['-l', '--break', $word, $file]);+are_mutually_exclusive('-l', '--group', ['-l', '--group', $word, $file]);+are_mutually_exclusive('-l', '-f', ['-l', '-f', $file]);+are_mutually_exclusive('-l', '-g', ['-l', '-g', $word, $file]);+are_mutually_exclusive('-l', '--show-types', ['-l', '--show-types', $word, $file]);  # -L/--files-without-matches-are_mutually_exclusive('-L', '-l', ['-L', '-l', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '-o', ['-L', '-o', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '--passthru', ['-L', '--passthru', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '--output', ['-L', '--output', '$&', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '--output', ['-L', '--output=$&', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '--max-count', ['-L', '--max-count', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '--max-count', ['-L', '--max-count=1', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '-h', ['-L', '-h', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '--with-filename', ['-L', '--with-filename', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '--no-filename', ['-L', '--no-filename', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '--column', ['-L', '--column', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '-A', ['-L', '-A', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '--after-context', ['-L', '--after-context', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '--after-context', ['-L', '--after-context=1', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '-B', ['-L', '-B', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '--before-context', ['-L', '--before-context', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '--before-context', ['-L', '--before-context=1', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '-C', ['-L', '-C', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '--context', ['-L', '--context', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '--context', ['-L', '--context=1', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '--heading', ['-L', '--heading', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '--break', ['-L', '--break', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '--group', ['-L', '--group', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '-f', ['-L', '-f', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '-g', ['-L', '-g', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '--show-types', ['-L', '--show-types', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '-c', ['-L', '-c', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-L', '--count', ['-L', '--count', 'science', 't/text/science-of-myth.txt']);+are_mutually_exclusive('-L', '-l', ['-L', '-l', $word, $file]);+are_mutually_exclusive('-L', '-o', ['-L', '-o', $word, $file]);+are_mutually_exclusive('-L', '--passthru', ['-L', '--passthru', $word, $file]);+are_mutually_exclusive('-L', '--output', ['-L', '--output', '$&', $word, $file]);+are_mutually_exclusive('-L', '--output', ['-L', '--output=$&', $word, $file]);+are_mutually_exclusive('-L', '--max-count', ['-L', '--max-count', 1, $word, $file]);+are_mutually_exclusive('-L', '--max-count', ['-L', '--max-count=1', $word, $file]);+are_mutually_exclusive('-L', '-h', ['-L', '-h', $word, $file]);+are_mutually_exclusive('-L', '--with-filename', ['-L', '--with-filename', $word, $file]);+are_mutually_exclusive('-L', '--no-filename', ['-L', '--no-filename', $word, $file]);+are_mutually_exclusive('-L', '--column', ['-L', '--column', $word, $file]);+are_mutually_exclusive('-L', '-A', ['-L', '-A', 1, $word, $file]);+are_mutually_exclusive('-L', '--after-context', ['-L', '--after-context', 1, $word, $file]);+are_mutually_exclusive('-L', '--after-context', ['-L', '--after-context=1', $word, $file]);+are_mutually_exclusive('-L', '-B', ['-L', '-B', 1, $word, $file]);+are_mutually_exclusive('-L', '--before-context', ['-L', '--before-context', 1, $word, $file]);+are_mutually_exclusive('-L', '--before-context', ['-L', '--before-context=1', $word, $file]);+are_mutually_exclusive('-L', '-C', ['-L', '-C', 1, $word, $file]);+are_mutually_exclusive('-L', '--context', ['-L', '--context', 1, $word, $file]);+are_mutually_exclusive('-L', '--context', ['-L', '--context=1', $word, $file]);+are_mutually_exclusive('-L', '--heading', ['-L', '--heading', $word, $file]);+are_mutually_exclusive('-L', '--break', ['-L', '--break', $word, $file]);+are_mutually_exclusive('-L', '--group', ['-L', '--group', $word, $file]);+are_mutually_exclusive('-L', '-f', ['-L', '-f', $file]);+are_mutually_exclusive('-L', '-g', ['-L', '-g', $word, $file]);+are_mutually_exclusive('-L', '--show-types', ['-L', '--show-types', $word, $file]);+are_mutually_exclusive('-L', '-c', ['-L', '-c', $word, $file]);+are_mutually_exclusive('-L', '--count', ['-L', '--count', $word, $file]);  # -o-are_mutually_exclusive('-o', '--output', ['-o', '--output', '$&', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-o', '--output', ['-o', '--output=$&', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-o', '-c', ['-o', '-c', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-o', '--count', ['-o', '--count', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-o', '--column', ['-o', '--column', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-o', '-A', ['-o', '-A', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-o', '--after-context', ['-o', '--after-context', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-o', '--after-context', ['-o', '--after-context=1', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-o', '-B', ['-o', '-B', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-o', '--before-context', ['-o', '--before-context', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-o', '--before-context', ['-o', '--before-context=1', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-o', '-C', ['-o', '-C', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-o', '--context', ['-o', '--context', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-o', '--context', ['-o', '--context=1', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-o', '-f', ['-o', '-f', 'science', 't/text/science-of-myth.txt']);+are_mutually_exclusive('-o', '--output', ['-o', '--output', '$&', $word, $file]);+are_mutually_exclusive('-o', '--output', ['-o', '--output=$&', $word, $file]);+are_mutually_exclusive('-o', '-c', ['-o', '-c', $word, $file]);+are_mutually_exclusive('-o', '--count', ['-o', '--count', $word, $file]);+are_mutually_exclusive('-o', '--column', ['-o', '--column', $word, $file]);+are_mutually_exclusive('-o', '-A', ['-o', '-A', 1, $word, $file]);+are_mutually_exclusive('-o', '--after-context', ['-o', '--after-context', 1, $word, $file]);+are_mutually_exclusive('-o', '--after-context', ['-o', '--after-context=1', $word, $file]);+are_mutually_exclusive('-o', '-B', ['-o', '-B', 1, $word, $file]);+are_mutually_exclusive('-o', '--before-context', ['-o', '--before-context', 1, $word, $file]);+are_mutually_exclusive('-o', '--before-context', ['-o', '--before-context=1', $word, $file]);+are_mutually_exclusive('-o', '-C', ['-o', '-C', 1, $word, $file]);+are_mutually_exclusive('-o', '--context', ['-o', '--context', 1, $word, $file]);+are_mutually_exclusive('-o', '--context', ['-o', '--context=1', $word, $file]);+are_mutually_exclusive('-o', '-f', ['-o', '-f', $word, $file]);  # --passthru-are_mutually_exclusive('--passthru', '--output', ['--passthru', '--output', '$&', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '--output', ['--passthru', '--output=$&', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '-m', ['--passthru', '-m', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '--max-count', ['--passthru', '--max-count', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '--max-count', ['--passthru', '--max-count=1', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '-1', ['--passthru', '-1', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '-c', ['--passthru', '-c', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '--count', ['--passthru', '--count', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '--count', ['--passthru', '--count', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '-A', ['--passthru', '-A', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '--after-context', ['--passthru', '--after-context', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '--after-context', ['--passthru', '--after-context=1', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '-B', ['--passthru', '-B', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '--before-context', ['--passthru', '--before-context', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '--before-context', ['--passthru', '--before-context=1', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '-C', ['--passthru', '-C', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '--context', ['--passthru', '--context', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '--context', ['--passthru', '--context=1', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '-f', ['--passthru', '-f', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '-g', ['--passthru', '-g', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--passthru', '--column', ['--passthru', '--column', 'science', 't/text/science-of-myth.txt']);+are_mutually_exclusive('--passthru', '--output', ['--passthru', '--output', '$&', $word, $file]);+are_mutually_exclusive('--passthru', '--output', ['--passthru', '--output=$&', $word, $file]);+are_mutually_exclusive('--passthru', '-m', ['--passthru', '-m', 1, $word, $file]);+are_mutually_exclusive('--passthru', '--max-count', ['--passthru', '--max-count', 1, $word, $file]);+are_mutually_exclusive('--passthru', '--max-count', ['--passthru', '--max-count=1', $word, $file]);+are_mutually_exclusive('--passthru', '-1', ['--passthru', '-1', $word, $file]);+are_mutually_exclusive('--passthru', '-c', ['--passthru', '-c', $word, $file]);+are_mutually_exclusive('--passthru', '--count', ['--passthru', '--count', $word, $file]);+are_mutually_exclusive('--passthru', '--count', ['--passthru', '--count', $word, $file]);+are_mutually_exclusive('--passthru', '-A', ['--passthru', '-A', 1, $word, $file]);+are_mutually_exclusive('--passthru', '--after-context', ['--passthru', '--after-context', 1, $word, $file]);+are_mutually_exclusive('--passthru', '--after-context', ['--passthru', '--after-context=1', $word, $file]);+are_mutually_exclusive('--passthru', '-B', ['--passthru', '-B', 1, $word, $file]);+are_mutually_exclusive('--passthru', '--before-context', ['--passthru', '--before-context', 1, $word, $file]);+are_mutually_exclusive('--passthru', '--before-context', ['--passthru', '--before-context=1', $word, $file]);+are_mutually_exclusive('--passthru', '-C', ['--passthru', '-C', 1, $word, $file]);+are_mutually_exclusive('--passthru', '--context', ['--passthru', '--context', 1, $word, $file]);+are_mutually_exclusive('--passthru', '--context', ['--passthru', '--context=1', $word, $file]);+are_mutually_exclusive('--passthru', '-f', ['--passthru', '-f', $word, $file]);+are_mutually_exclusive('--passthru', '-g', ['--passthru', '-g', $word, $file]);+are_mutually_exclusive('--passthru', '--column', ['--passthru', '--column', $word, $file]);  # --output-are_mutually_exclusive('--output', '-c', ['--output', '$&', '-c', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--output', '--count', ['--output', '$&', '--count', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--output', '-f', ['--output', '$&', '-f', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--output', '-g', ['--output', '$&', '-g', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--output', '-c', ['--output=$&', '-c', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--output', '--count', ['--output=$&', '--count', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--output', '-f', ['--output=$&', '-f', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--output', '-g', ['--output=$&', '-g', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--output', '-A', ['--output=$&', '-A2', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--output', '-B', ['--output=$&', '-B2', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--output', '-C', ['--output=$&', '-C2', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--output', '--after-context', ['--output=$&', '--after-context=2', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--output', '--before-context', ['--output=$&', '--before-context=2', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--output', '--context', ['--output=$&', '--context=2', 'science', 't/text/science-of-myth.txt']);+are_mutually_exclusive('--output', '-c', ['--output', '$&', '-c', $word, $file]);+are_mutually_exclusive('--output', '--count', ['--output', '$&', '--count', $word, $file]);+are_mutually_exclusive('--output', '-f', ['--output', '$&', '-f', $file]);+are_mutually_exclusive('--output', '-g', ['--output', '$&', '-g', $word, $file]);+are_mutually_exclusive('--output', '-c', ['--output=$&', '-c', $word, $file]);+are_mutually_exclusive('--output', '--count', ['--output=$&', '--count', $word, $file]);+are_mutually_exclusive('--output', '-f', ['--output=$&', '-f', $file]);+are_mutually_exclusive('--output', '-g', ['--output=$&', '-g', $word, $file]);+are_mutually_exclusive('--output', '-A', ['--output=$&', '-A2', $word, $file]);+are_mutually_exclusive('--output', '-B', ['--output=$&', '-B2', $word, $file]);+are_mutually_exclusive('--output', '-C', ['--output=$&', '-C2', $word, $file]);+are_mutually_exclusive('--output', '--after-context', ['--output=$&', '--after-context=2', $word, $file]);+are_mutually_exclusive('--output', '--before-context', ['--output=$&', '--before-context=2', $word, $file]);+are_mutually_exclusive('--output', '--context', ['--output=$&', '--context=2', $word, $file]);  # --match-are_mutually_exclusive('--match', '-f', ['--match', 'science', '-f', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--match', '-g', ['--match', 'science', '-g', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--match', '-f', ['--match=science', '-f', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--match', '-g', ['--match=science', '-g', 't/text/science-of-myth.txt']);+are_mutually_exclusive('--match', '-f', ['--match', $word, '-f', $file]);+are_mutually_exclusive('--match', '-g', ['--match', $word, '-g', $file]);+are_mutually_exclusive('--match', '-f', ['--match=science', '-f', $file]);+are_mutually_exclusive('--match', '-g', ['--match=science', '-g', $file]);  # --max-count-are_mutually_exclusive('-m', '-1', ['-m', 1, '-1', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-m', '-c', ['-m', 1, '-c', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-m', '-f', ['-m', 1, '-f', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-m', '-g', ['-m', 1, '-g', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--max-count', '-1', ['--max-count', 1, '-1', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--max-count', '-c', ['--max-count', 1, '-c', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--max-count', '-f', ['--max-count', 1, '-f', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--max-count', '-g', ['--max-count', 1, '-g', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--max-count', '-1', ['--max-count=1', '-1', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--max-count', '-c', ['--max-count=1', '-c', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--max-count', '-f', ['--max-count=1', '-f', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--max-count', '-g', ['--max-count=1', '-g', 'science', 't/text/science-of-myth.txt']);+are_mutually_exclusive('-m', '-1', ['-m', 1, '-1', $word, $file]);+are_mutually_exclusive('-m', '-c', ['-m', 1, '-c', $word, $file]);+are_mutually_exclusive('-m', '-f', ['-m', 1, '-f', $word, $file]);+are_mutually_exclusive('-m', '-g', ['-m', 1, '-g', $word, $file]);+are_mutually_exclusive('--max-count', '-1', ['--max-count', 1, '-1', $word, $file]);+are_mutually_exclusive('--max-count', '-c', ['--max-count', 1, '-c', $word, $file]);+are_mutually_exclusive('--max-count', '-f', ['--max-count', 1, '-f', $word, $file]);+are_mutually_exclusive('--max-count', '-g', ['--max-count', 1, '-g', $word, $file]);+are_mutually_exclusive('--max-count', '-1', ['--max-count=1', '-1', $word, $file]);+are_mutually_exclusive('--max-count', '-c', ['--max-count=1', '-c', $word, $file]);+are_mutually_exclusive('--max-count', '-f', ['--max-count=1', '-f', $word, $file]);+are_mutually_exclusive('--max-count', '-g', ['--max-count=1', '-g', $word, $file]);  # -h/--no-filename-are_mutually_exclusive('-h', '-H', ['-h', '-H', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-h', '--with-filename', ['-h', '--with-filename', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-h', '-f', ['-h', '-f', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-h', '-g', ['-h', '-g', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-h', '--group', ['-h', '--group', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-h', '--heading', ['-h', '--heading', 'science', 't/text/science-of-myth.txt']);--are_mutually_exclusive('--no-filename', '-H', ['--no-filename', '-H', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--no-filename', '--with-filename', ['--no-filename', '--with-filename', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--no-filename', '-f', ['--no-filename', '-f', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--no-filename', '-g', ['--no-filename', '-g', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--no-filename', '--group', ['--no-filename', '--group', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--no-filename', '--heading', ['--no-filename', '--heading', 'science', 't/text/science-of-myth.txt']);+are_mutually_exclusive('-h', '-H', ['-h', '-H', $word, $file]);+are_mutually_exclusive('-h', '--with-filename', ['-h', '--with-filename', $word, $file]);+are_mutually_exclusive('-h', '-f', ['-h', '-f', $word, $file]);+are_mutually_exclusive('-h', '-g', ['-h', '-g', $word, $file]);+are_mutually_exclusive('-h', '--group', ['-h', '--group', $word, $file]);+are_mutually_exclusive('-h', '--heading', ['-h', '--heading', $word, $file]);++are_mutually_exclusive('--no-filename', '-H', ['--no-filename', '-H', $word, $file]);+are_mutually_exclusive('--no-filename', '--with-filename', ['--no-filename', '--with-filename', $word, $file]);+are_mutually_exclusive('--no-filename', '-f', ['--no-filename', '-f', $word, $file]);+are_mutually_exclusive('--no-filename', '-g', ['--no-filename', '-g', $word, $file]);+are_mutually_exclusive('--no-filename', '--group', ['--no-filename', '--group', $word, $file]);+are_mutually_exclusive('--no-filename', '--heading', ['--no-filename', '--heading', $word, $file]);  # -H/--with-filename-are_mutually_exclusive('-H', '-h', ['-H', '-h', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-H', '--no-filename', ['-H', '--no-filename', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-H', '-f', ['-H', '-f', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-H', '-g', ['-H', '-g', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--with-filename', '-h', ['--with-filename', '-h', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--with-filename', '--no-filename', ['--with-filename', '--no-filename', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--with-filename', '-f', ['--with-filename', '-f', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--with-filename', '-g', ['--with-filename', '-g', 'science', 't/text/science-of-myth.txt']);+are_mutually_exclusive('-H', '-h', ['-H', '-h', $word, $file]);+are_mutually_exclusive('-H', '--no-filename', ['-H', '--no-filename', $word, $file]);+are_mutually_exclusive('-H', '-f', ['-H', '-f', $word, $file]);+are_mutually_exclusive('-H', '-g', ['-H', '-g', $word, $file]);+are_mutually_exclusive('--with-filename', '-h', ['--with-filename', '-h', $word, $file]);+are_mutually_exclusive('--with-filename', '--no-filename', ['--with-filename', '--no-filename', $word, $file]);+are_mutually_exclusive('--with-filename', '-f', ['--with-filename', '-f', $word, $file]);+are_mutually_exclusive('--with-filename', '-g', ['--with-filename', '-g', $word, $file]);  # -c/--count-are_mutually_exclusive('-c', '--column', ['-c', '--column', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-c', '-A', ['-c', '-A', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-c', '--after-context', ['-c', '--after-context', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-c', '-B', ['-c', '-B', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-c', '--before-context', ['-c', '--before-context', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-c', '-C', ['-c', '-C', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-c', '--context', ['-c', '--context', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-c', '--heading', ['-c', '--heading', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-c', '--group', ['-c', '--group', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-c', '--break', ['-c', '--break', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-c', '-f', ['-c', '-f', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-c', '-g', ['-c', '-g', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--count', '--column', ['--count', '--column', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--count', '-A', ['--count', '-A', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--count', '--after-context', ['--count', '--after-context', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--count', '-B', ['--count', '-B', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--count', '--before-context', ['--count', '--before-context', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--count', '-C', ['--count', '-C', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--count', '--context', ['--count', '--context', 1, 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--count', '--heading', ['--count', '--heading', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--count', '--group', ['--count', '--group', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--count', '--break', ['--count', '--break', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--count', '-f', ['--count', '-f', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--count', '-g', ['--count', '-g', 'science', 't/text/science-of-myth.txt']);+are_mutually_exclusive('-c', '--column', ['-c', '--column', $word, $file]);+are_mutually_exclusive('-c', '-A', ['-c', '-A', 1, $word, $file]);+are_mutually_exclusive('-c', '--after-context', ['-c', '--after-context', 1, $word, $file]);+are_mutually_exclusive('-c', '-B', ['-c', '-B', 1, $word, $file]);+are_mutually_exclusive('-c', '--before-context', ['-c', '--before-context', 1, $word, $file]);+are_mutually_exclusive('-c', '-C', ['-c', '-C', 1, $word, $file]);+are_mutually_exclusive('-c', '--context', ['-c', '--context', 1, $word, $file]);+are_mutually_exclusive('-c', '--heading', ['-c', '--heading', $word, $file]);+are_mutually_exclusive('-c', '--group', ['-c', '--group', $word, $file]);+are_mutually_exclusive('-c', '--break', ['-c', '--break', $word, $file]);+are_mutually_exclusive('-c', '-f', ['-c', '-f', $word, $file]);+are_mutually_exclusive('-c', '-g', ['-c', '-g', $word, $file]);+are_mutually_exclusive('--count', '--column', ['--count', '--column', $word, $file]);+are_mutually_exclusive('--count', '-A', ['--count', '-A', 1, $word, $file]);+are_mutually_exclusive('--count', '--after-context', ['--count', '--after-context', 1, $word, $file]);+are_mutually_exclusive('--count', '-B', ['--count', '-B', 1, $word, $file]);+are_mutually_exclusive('--count', '--before-context', ['--count', '--before-context', 1, $word, $file]);+are_mutually_exclusive('--count', '-C', ['--count', '-C', 1, $word, $file]);+are_mutually_exclusive('--count', '--context', ['--count', '--context', 1, $word, $file]);+are_mutually_exclusive('--count', '--heading', ['--count', '--heading', $word, $file]);+are_mutually_exclusive('--count', '--group', ['--count', '--group', $word, $file]);+are_mutually_exclusive('--count', '--break', ['--count', '--break', $word, $file]);+are_mutually_exclusive('--count', '-f', ['--count', '-f', $word, $file]);+are_mutually_exclusive('--count', '-g', ['--count', '-g', $word, $file]);  # --column-are_mutually_exclusive('--column', '-f', ['--column', '-f', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--column', '-g', ['--column', '-g', 'science', 't/text/science-of-myth.txt']);+are_mutually_exclusive('--column', '-f', ['--column', '-f', $word, $file]);+are_mutually_exclusive('--column', '-g', ['--column', '-g', $word, $file]);  # -A/-B/-C/--after-context/--before-context/--context-are_mutually_exclusive('-A', '-f', ['-A', 1, '-f', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-A', '-g', ['-A', 1, '-g', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--after-context', '-f', ['--after-context', 1, '-f', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--after-context', '-g', ['--after-context', 1, '-g', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-B', '-f', ['-B', 1, '-f', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-B', '-g', ['-B', 1, '-g', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--before-context', '-f', ['--before-context', 1, '-f', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--before-context', '-g', ['--before-context', 1, '-g', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-C', '-f', ['-C', 1, '-f', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-C', '-g', ['-C', 1, '-g', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--context', '-f', ['--context', 1, '-f', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('--context', '-g', ['--context', 1, '-g', 'science', 't/text/science-of-myth.txt']);+are_mutually_exclusive('-A', '-f', ['-A', 1, '-f', $word, $file]);+are_mutually_exclusive('-A', '-g', ['-A', 1, '-g', $word, $file]);+are_mutually_exclusive('--after-context', '-f', ['--after-context', 1, '-f', $word, $file]);+are_mutually_exclusive('--after-context', '-g', ['--after-context', 1, '-g', $word, $file]);+are_mutually_exclusive('-B', '-f', ['-B', 1, '-f', $word, $file]);+are_mutually_exclusive('-B', '-g', ['-B', 1, '-g', $word, $file]);+are_mutually_exclusive('--before-context', '-f', ['--before-context', 1, '-f', $word, $file]);+are_mutually_exclusive('--before-context', '-g', ['--before-context', 1, '-g', $word, $file]);+are_mutually_exclusive('-C', '-f', ['-C', 1, '-f', $word, $file]);+are_mutually_exclusive('-C', '-g', ['-C', 1, '-g', $word, $file]);+are_mutually_exclusive('--context', '-f', ['--context', 1, '-f', $word, $file]);+are_mutually_exclusive('--context', '-g', ['--context', 1, '-g', $word, $file]);  # -f-are_mutually_exclusive('-f', '-g', ['-f', '-g', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-f', '--group', ['-f', '--group', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-f', '--heading', ['-f', '--heading', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-f', '--break', ['-f', '--break', 'science', 't/text/science-of-myth.txt']);+are_mutually_exclusive('-f', '-g', ['-f', '-g', $word, $file]);+are_mutually_exclusive('-f', '--group', ['-f', '--group', $word, $file]);+are_mutually_exclusive('-f', '--heading', ['-f', '--heading', $word, $file]);+are_mutually_exclusive('-f', '--break', ['-f', '--break', $word, $file]);  # -g-are_mutually_exclusive('-g', '--group', ['-g', '--group', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-g', '--heading', ['-g', '--heading', 'science', 't/text/science-of-myth.txt']);-are_mutually_exclusive('-g', '--break', ['-g', '--break', 'science', 't/text/science-of-myth.txt']);+are_mutually_exclusive('-g', '--group', ['-g', '--group', $word, $file]);+are_mutually_exclusive('-g', '--heading', ['-g', '--heading', $word, $file]);+are_mutually_exclusive('-g', '--break', ['-g', '--break', $word, $file]);  subtest q{Verify that "options" that follow -- aren't factored into the mutual exclusivity} => sub {-    my ( $stdout, $stderr ) = run_ack_with_stderr('-A', 5, 'science', 't/text/science-of-myth.txt', '--', '-l');+    my ( $stdout, $stderr ) = run_ack_with_stderr('-A', 5, $word, $file, '--', '-l');     ok(@{$stdout} > 0, 'Some lines should appear on standard output');     is(scalar(@{$stderr}), 1, 'A single line should be present on standard error');-    like($stderr->[0], qr/No such file or directory/, 'The error message should indicate a missing file (-l)');+    like($stderr->[0], qr/No such file or directory/, 'The error message should indicate a missing file (-l is a filename here, not an option)');     is(get_rc(), 0, 'The ack command should not fail'); }; @@ -301,7 +306,7 @@ subtest q{Verify that mutually exclusive options in different sources don't caus --group END_ACKRC -    my @stdout = run_ack('--count', 't/text/science-of-myth.txt', {+    my @stdout = run_ack('--count', $file, {         ackrc => \$ackrc,     });     ok(@stdout > 0, 'Some lines should appear on standard output');

t/text/4th-of-july.txt

deleted file mode 100644@@ -1,37 +0,0 @@-Alone with the morning burning red-On the canvas in my head-Painting a picture of you-And me driving across country-In a dusty old RV-Just the road and its majesty-And I'm looking at you-With the world in the rear view--Chorus:-You were pretty as can be, sitting in the front seat-Looking at me, telling me you love me,-And you're happy to be with me on the 4th of July-We sang "Stranglehold" to the stereo-Couldn't take no more of that rock and roll-So we put on a little George Jones and just sang along--Those white lines-Get drawn into the sun-If you ain't got no one-To keep you hanging on-And there you were-Like a queen in your nightgown-Riding shotgun from town to town-Staking a claim on the world we found-And I'm singing to you-You're singing to me-You were out of the blue to a boy like me--Chorus--And I'm lookin' for you-In the silence that we shared--Chorus--    -- "4th of July", Shooter Jennings

t/text/amontillado.txt

new file mode 100644@@ -0,0 +1,328 @@+# The Cask of Amontillado, by Edgar Allen Poe++The thousand injuries of Fortunato I had borne as I best could; but+when he ventured upon insult, I vowed revenge. You, who so well+know the nature of my soul, will not suppose, however, that I gave+utterance to a threat. At length I would be avenged; this was a+point definitively settled--but the very definitiveness with which+it was resolved, precluded the idea of risk. I must not only punish,+but punish with impunity. A wrong is unredressed when retribution+overtakes its redresser. It is equally unredressed when the avenger+fails to make himself felt as such to him who has done the wrong.++It must be understood, that neither by word nor deed had I given+Fortunato cause to doubt my good will. I continued, as was my wont,+to smile in his face, and he did not perceive that my smile now was+at the thought of his immolation.++He had a weak point--this Fortunato--although in other regards he+was a man to be respected and even feared. He prided himself on his+connoisseurship in wine. Few Italians have the true virtuoso spirit.+For the most part their enthusiasm is adopted to suit the time and+opportunity--to practise imposture upon the British and Austrian+millionaires. In painting and gemmary Fortunato, like his countrymen,+was a quack--but in the matter of old wines he was sincere. In this+respect I did not differ from him materially: I was skilful in the+Italian vintages myself, and bought largely whenever I could.++It was about dusk, one evening during the supreme madness of the+carnival season, that I encountered my friend. He accosted me with+excessive warmth, for he had been drinking much. The man wore motley.+He had on a tight-fitting parti-striped dress, and his head was+surmounted by the conical cap and bells. I was so pleased to see+him, that I thought I should never have done wringing his hand.++I said to him--"My dear Fortunato, you are luckily met. How remarkably+well you are looking to-day! But I have received a pipe of what+passes for Amontillado, and I have my doubts."++"How?" said he. "Amontillado? A pipe! Impossible! And in the middle+of the carnival!"++"I have my doubts," I replied; "and I was silly enough to pay the+full Amontillado price without consulting you in the matter. You+were not to be found, and I was fearful of losing a bargain."++"Amontillado!"++"I have my doubts."++"Amontillado!"++"And I must satisfy them."++"Amontillado!"++"As you are engaged, I am on my way to Luchesi. If any one has a+critical turn, it is he. He will tell me--"++"Luchesi cannot tell Amontillado from Sherry."++"And yet some fools will have it that his taste is a match for your+own."++"Come, let us go."++"Whither?"++"To your vaults."++"My friend, no; I will not impose upon your good nature. I perceive+you have an engagement. Luchesi--"++"I have no engagement;--come."++"My friend, no. It is not the engagement, but the severe cold with+which I perceive you are afflicted. The vaults are insufferably+damp. They are encrusted with nitre."++"Let us go, nevertheless. The cold is merely nothing. Amontillado!+You have been imposed upon. And as for Luchesi, he cannot distinguish+Sherry from Amontillado."++Thus speaking, Fortunato possessed himself of my arm. Putting on a+mask of black silk, and drawing a roquelaire closely about my person,+I suffered him to hurry me to my palazzo.++There were no attendants at home; they had absconded to make merry+in honor of the time. I had told them that I should not return until+the morning, and had given them explicit orders not to stir from+the house. These orders were sufficient, I well knew, to insure+their immediate disappearance, one and all, as soon as my back was+turned.++I took from their sconces two flambeaux, and giving one to Fortunato,+bowed him through several suites of rooms to the archway that led+into the vaults. I passed down a long and winding staircase,+requesting him to be cautious as he followed. We came at length to+the foot of the descent, and stood together on the damp ground of+the catacombs of the Montresors.++The gait of my friend was unsteady, and the bells upon his cap+jingled as he strode.++"The pipe," said he.++"It is farther on," said I; "but observe the white web-work which+gleams from these cavern walls."++He turned towards me, and looked into my eyes with two filmy orbs+that distilled the rheum of intoxication.++"Nitre?" he asked, at length.++"Nitre," I replied. "How long have you had that cough?"++"Ugh! ugh! ugh!--ugh! ugh! ugh!--ugh! ugh! ugh!--ugh! ugh! ugh!--ugh!+ugh! ugh!"++My poor friend found it impossible to reply for many minutes.++"It is nothing," he said, at last.++"Come," I said, with decision, "we will go back; your health is+precious. You are rich, respected, admired, beloved; you are happy,+as once I was. You are a man to be missed. For me it is no matter.+We will go back; you will be ill, and I cannot be responsible.+Besides, there is Luchesi--"++"Enough," he said; "the cough is a mere nothing; it will not kill+me. I shall not die of a cough."++"True--true," I replied; "and, indeed, I had no intention of alarming+you unnecessarily--but you should use all proper caution. A draught+of this Medoc will defend us from the damps."++Here I knocked off the neck of a bottle which I drew from a long+row of its fellows that lay upon the mould.++"Drink," I said, presenting him the wine.++He raised it to his lips with a leer. He paused and nodded to me+familiarly, while his bells jingled.++"I drink," he said, "to the buried that repose around us."++"And I to your long life."++He again took my arm, and we proceeded.++"These vaults," he said, "are extensive."++"The Montresors," I replied, "were a great and numerous family."++"I forget your arms."++"A huge human foot d'or, in a field azure; the foot crushes a serpent+rampant whose fangs are imbedded in the heel."++"And the motto?"++"Nemo me impune lacessit."++"Good!" he said.++The wine sparkled in his eyes and the bells jingled. My own fancy+grew warm with the Medoc. We had passed through walls of piled+bones, with casks and puncheons intermingling, into the inmost+recesses of the catacombs. I paused again, and this time I made+bold to seize Fortunato by an arm above the elbow.++"The nitre!" I said; "see, it increases. It hangs like moss upon+the vaults. We are below the river's bed. The drops of moisture+trickle among the bones. Come, we will go back ere it is too late.+Your cough--"++"It is nothing," he said; "let us go on. But first, another draught+of the Medoc."++I broke and reached him a flaçon of De Grâve. He emptied it at a+breath. His eyes flashed with a fierce light. He laughed and threw+the bottle upwards with a gesticulation I did not understand.++I looked at him in surprise. He repeated the movement--a grotesque+one.++"You do not comprehend?" he said.++"Not I," I replied.++"Then you are not of the brotherhood."++"How?"++"You are not of the masons."++"Yes, yes," I said, "yes, yes."++"You? Impossible! A mason?"++"A mason," I replied.++"A sign," he said.++"It is this," I answered, producing a trowel from beneath the folds+of my roquelaire.++"You jest," he exclaimed, recoiling a few paces. "But let us proceed+to the Amontillado."++"Be it so," I said, replacing the tool beneath the cloak, and again+offering him my arm. He leaned upon it heavily. We continued our+route in search of the Amontillado. We passed through a range of+low arches, descended, passed on, and descending again, arrived at+a deep crypt, in which the foulness of the air caused our flambeaux+rather to glow than flame.++At the most remote end of the crypt there appeared another less+spacious. Its walls had been lined with human remains, piled to the+vault overhead, in the fashion of the great catacombs of Paris.+Three sides of this interior crypt were still ornamented in this+manner. From the fourth side the bones had been thrown down, and+lay promiscuously upon the earth, forming at one point a mound of+some size. Within the wall thus exposed by the displacing of the+bones, we perceived a still interior recess, in depth about four+feet, in width three, in height six or seven. It seemed to have+been constructed for no especial use within itself, but formed+merely the interval between two of the colossal supports of the+roof of the catacombs, and was backed by one of their circumscribing+walls of solid granite.++It was in vain that Fortunato, uplifting his dull torch, endeavored+to pry into the depth of the recess. Its termination the feeble+light did not enable us to see.++"Proceed," I said; "herein is the Amontillado. As for Luchesi--"++"He is an ignoramus," interrupted my friend, as he stepped unsteadily+forward, while I followed immediately at his heels. In an instant+he had reached the extremity of the niche, and finding his progress+arrested by the rock, stood stupidly bewildered. A moment more and+I had fettered him to the granite. In its surface were two iron+staples, distant from each other about two feet, horizontally. From+one of these depended a short chain, from the other a padlock.+Throwing the links about his waist, it was but the work of a few+seconds to secure it. He was too much astounded to resist. Withdrawing+the key I stepped back from the recess.++"Pass your hand," I said, "over the wall; you cannot help feeling+the nitre. Indeed it is very damp. Once more let me implore you to+return. No? Then I must positively leave you. But I must first+render you all the little attentions in my power."++"The Amontillado!" ejaculated my friend, not yet recovered from his+astonishment.++"True," I replied; "the Amontillado."++As I said these words I busied myself among the pile of bones of+which I have before spoken. Throwing them aside, I soon uncovered+a quantity of building stone and mortar. With these materials and+with the aid of my trowel, I began vigorously to wall up the entrance+of the niche.++I had scarcely laid the first tier of the masonry when I discovered+that the intoxication of Fortunato had in a great measure worn off.+The earliest indication I had of this was a low moaning cry from+the depth of the recess. It was not the cry of a drunken man. There+was then a long and obstinate silence. I laid the second tier, and+the third, and the fourth; and then I heard the furious vibrations+of the chain. The noise lasted for several minutes, during which,+that I might hearken to it with the more satisfaction, I ceased my+labors and sat down upon the bones. When at last the clanking+subsided, I resumed the trowel, and finished without interruption+the fifth, the sixth, and the seventh tier. The wall was now nearly+upon a level with my breast. I again paused, and holding the flambeaux+over the mason-work, threw a few feeble rays upon the figure within.++A succession of loud and shrill screams, bursting suddenly from the+throat of the chained form, seemed to thrust me violently back. For+a brief moment I hesitated--I trembled. Unsheathing my rapier, I+began to grope with it about the recess: but the thought of an+instant reassured me. I placed my hand upon the solid fabric of the+catacombs, and felt satisfied. I reapproached the wall. I replied+to the yells of him who clamored. I re-echoed--I aided--I surpassed+them in volume and in strength. I did this, and the clamorer grew+still.++It was now midnight, and my task was drawing to a close. I had+completed the eighth, the ninth, and the tenth tier. I had finished+a portion of the last and the eleventh; there remained but a single+stone to be fitted and plastered in. I struggled with its weight;+I placed it partially in its destined position. But now there came+from out the niche a low laugh that erected the hairs upon my head.+It was succeeded by a sad voice, which I had difficulty in recognising+as that of the noble Fortunate. The voice said--++"Ha! ha! ha!--he! he!--a very good joke indeed--an excellent jest.+We will have many a rich laugh about it at the palazzo--he! he!+he!--over our wine--he! he! he!"++"The Amontillado!" I said.++"He! he! he!--he! he! he!--yes, the Amontillado. But is it not+getting late? Will not they be awaiting us at the palazzo, the Lady+Fortunato and the rest? Let us be gone."++"Yes,"I said, "let us be gone."++"For the love of God, Montresor!"++"Yes," I said, "for the love of God!"++But to these words I hearkened in vain for a reply. I grew impatient.+I called aloud--++"Fortunato!"++No answer. I called again--++"Fortunato!"++No answer still. I thrust a torch through the remaining aperture+and let it fall within. There came forth in return only a jingling+of the bells. My heart grew sick--on account of the dampness of the+catacombs. I hastened to make an end of my labor. I forced the last+stone into its position; I plastered it up. Against the new masonry+I re-erected the old rampart of bones. For the half of a century+no mortal has disturbed them. In pace requiescat!

t/text/bill-of-rights.txt

new file mode 100644@@ -0,0 +1,70 @@+# Amendment I++Congress shall make no law respecting an establishment of religion,+or prohibiting the free exercise thereof; or abridging the freedom of+speech, or of the press; or the right of the people peaceably to assemble,+and to petition the Government for a redress of grievances.++# Amendment II++A well regulated Militia, being necessary to the security of a free State,+the right of the people to keep and bear Arms, shall not be infringed.++# Amendment III++No Soldier shall, in time of peace be quartered in any house, without+the consent of the Owner, nor in time of war, but in a manner to be+prescribed by law.++# Amendment IV++The right of the people to be secure in their persons, houses, papers,+and effects, against unreasonable searches and seizures, shall not+be violated, and no Warrants shall issue, but upon probable cause,+supported by Oath or affirmation, and particularly describing the place+to be searched, and the persons or things to be seized.++# Amendment V++No person shall be held to answer for a capital, or otherwise infamous+crime, unless on a presentment or indictment of a Grand Jury, except in+cases arising in the land or naval forces, or in the Militia, when in+actual service in time of War or public danger; nor shall any person+be subject for the same offence to be twice put in jeopardy of life+or limb; nor shall be compelled in any criminal case to be a witness+against himself, nor be deprived of life, liberty, or property, without+due process of law; nor shall private property be taken for public use,+without just compensation.++# Amendment VI++In all criminal prosecutions, the accused shall enjoy the right to a+speedy and public trial, by an impartial jury of the State and district+wherein the crime shall have been committed, which district shall have+been previously ascertained by law, and to be informed of the nature and+cause of the accusation; to be confronted with the witnesses against+him; to have compulsory process for obtaining witnesses in his favor,+and to have the Assistance of Counsel for his defence.++# Amendment VII++In Suits at common law, where the value in controversy shall exceed+twenty dollars, the right of trial by jury shall be preserved, and no+fact tried by a jury, shall be otherwise re-examined in any Court of+the United States, than according to the rules of the common law.++# Amendment VIII++Excessive bail shall not be required, nor excessive fines imposed,+nor cruel and unusual punishments inflicted.++# Amendment IX++The enumeration in the Constitution, of certain rights, shall not be+construed to deny or disparage others retained by the people.++# Amendment X++The powers not delegated to the United States by the Constitution, nor+prohibited by it to the States, are reserved to the States respectively,+or to the people.

t/text/boy-named-sue.txt

deleted file mode 100644@@ -1,72 +0,0 @@-Well, my daddy left home when I was three-And he didn't leave very much for my Ma and me-'cept an old guitar and an empty bottle of booze.-Now, I don't blame him 'cause he run and hid-But the meanest thing that he ever did-Was before he left, he went and named me Sue.--Well, he must have thought that it was quite a joke-And it got a lot of laughs from a' lots of folks,-It seems I had to fight my whole life through.-Some gal would giggle and I'd turn red-And some guy'd laugh and I'd bust his head,-I tell ya, life ain't easy for a boy named Sue.--Well, I grew up quick and I grew up mean,-My fists got hard and my wits got keen,-I'd roam from town to town to hide my shame.-But I made me a vow to the moon and stars-That I'd search the honky-tonks and bars-And kill that man who gave me that awful name.--Well, it was Gatlinburg in mid-July-And I just hit town and my throat was dry,-I thought I'd stop and have myself a brew.-At an old saloon on a street of mud,-There at a table, dealing stud,-Sat the dirty, mangy dog that named me Sue.--Well, I knew that snake was my own sweet dad-From a worn-out picture that my mother'd had,-And I knew that scar on his cheek and his evil eye.-He was big and bent and gray and old,-And I looked at him and my blood ran cold-And I said: "My name is Sue! How do you do! Now you gonna die!"--Well, I hit him hard right between the eyes-And he went down, but to my surprise,-He come up with a knife and cut off a piece of my ear.-And I busted a chair right across his teeth-And we crashed through the wall and into the street-Kicking and a-gouging in the mud and the blood and the beer.--I tell ya, I've fought tougher men-But I really can't remember when,-He kicked like a mule and he bit like a crocodile.-I heard him laugh and then I heard him cuss,-He reached for his gun and I pulled mine first,-He stood there lookin' at me and I saw him smile.--And he said: "Son, this world is rough-And if a man's gonna make it, he's gotta be tough-And I knew I wouldn't be there to help ya along.-So I give ya that name and I said goodbye-I knew you'd have to get tough or die-And it's the name that helped to make you strong."--He said: "Now you just fought one hell of a fight-And I know you hate me, and you got the right-To kill me now, and I wouldn't blame you if you do.-But ya oughta thank me, before I die,-For the gravel in ya gut and the spit in ya eye-Cause I'm the son-of-a-bitch that named you Sue."--I got all choked up and I threw down my gun-I called him my pa, and he called me his son,-And I came away with a different point of view.-And I think about him, now and then,-Every time I try and every time I win,-And if I ever have a son, I think I'm gonna name him-Bill or George! Anything but Sue! I still hate that name!--    -- "A Boy Named Sue", Johnny Cash

t/text/constitution.txt

new file mode 100644@@ -0,0 +1,529 @@+# Preamble++We the People of the United States, in Order to form a more perfect+Union, establish Justice, insure domestic Tranquility, provide for the+common defense, promote the general Welfare, and secure the Blessings+of Liberty to ourselves and our Posterity, do ordain and establish this+Constitution for the United States of America.++# Article I++## Section 1++All legislative Powers herein granted shall be vested in a Congress+of the United States, which shall consist of a Senate and House of+Representatives.++## Section 2++The House of Representatives shall be composed of Members chosen every+second Year by the People of the several States, and the Electors in+each State shall have the Qualifications requisite for Electors of the+most numerous Branch of the State Legislature.++No Person shall be a Representative who shall not have attained to the+Age of twenty five Years, and been seven Years a Citizen of the United+States, and who shall not, when elected, be an Inhabitant of that State+in which he shall be chosen.++Representatives and direct Taxes shall be apportioned among the several+States which may be included within this Union, according to their+respective Numbers, which shall be determined by adding to the whole+Number of free Persons, including those bound to Service for a Term+of Years, and excluding Indians not taxed, three fifths of all other+Persons. The actual Enumeration shall be made within three Years after+the first Meeting of the Congress of the United States, and within+every subsequent Term of ten Years, in such Manner as they shall by Law+direct. The Number of Representatives shall not exceed one for every+thirty Thousand, but each State shall have at Least one Representative;+and until such enumeration shall be made, the State of New Hampshire+shall be entitled to chuse three, Massachusetts eight, Rhode-Island and+Providence Plantations one, Connecticut five, New-York six, New Jersey+four, Pennsylvania eight, Delaware one, Maryland six, Virginia ten,+North Carolina five, South Carolina five, and Georgia three.++When vacancies happen in the Representation from any State, the Executive+Authority thereof shall issue Writs of Election to fill such Vacancies.++The House of Representatives shall chuse their Speaker and other Officers;+and shall have the sole Power of Impeachment.++## Section 3++The Senate of the United States shall be composed of two Senators from+each State, chosen by the Legislature thereof, for six Years; and each+Senator shall have one Vote.++Immediately after they shall be assembled in Consequence of the+first Election, they shall be divided as equally as may be into three+Classes. The Seats of the Senators of the first Class shall be vacated at+the Expiration of the second Year, of the second Class at the Expiration+of the fourth Year, and of the third Class at the Expiration of the sixth+Year, so that one third may be chosen every second Year; and if Vacancies+happen by Resignation, or otherwise, during the Recess of the Legislature+of any State, the Executive thereof may make temporary Appointments until+the next Meeting of the Legislature, which shall then fill such Vacancies.++No Person shall be a Senator who shall not have attained to the Age of+thirty Years, and been nine Years a Citizen of the United States, and+who shall not, when elected, be an Inhabitant of that State for which+he shall be chosen.++The Vice President of the United States shall be President of the Senate,+but shall have no Vote, unless they be equally divided.++The Senate shall chuse their other Officers, and also a President pro+tempore, in the Absence of the Vice President, or when he shall exercise+the Office of President of the United States.++The Senate shall have the sole Power to try all Impeachments. When+sitting for that Purpose, they shall be on Oath or Affirmation. When the+President of the United States is tried, the Chief Justice shall preside:+And no Person shall be convicted without the Concurrence of two thirds+of the Members present.++Judgment in Cases of Impeachment shall not extend further than to removal+from Office, and disqualification to hold and enjoy any Office of honor,+Trust or Profit under the United States: but the Party convicted shall+nevertheless be liable and subject to Indictment, Trial, Judgment and+Punishment, according to Law.++## Section 4++The Times, Places and Manner of holding Elections for Senators and+Representatives, shall be prescribed in each State by the Legislature+thereof; but the Congress may at any time by Law make or alter such+Regulations, except as to the Places of chusing Senators.++The Congress shall assemble at least once in every Year, and such+Meeting shall be on the first Monday in December, unless they shall by+Law appoint a different Day.++## Section 5++Each House shall be the Judge of the Elections, Returns and Qualifications+of its own Members, and a Majority of each shall constitute a Quorum to+do Business; but a smaller Number may adjourn from day to day, and may+be authorized to compel the Attendance of absent Members, in such Manner,+and under such Penalties as each House may provide.++Each House may determine the Rules of its Proceedings, punish its Members+for disorderly Behaviour, and, with the Concurrence of two thirds,+expel a Member.++Each House shall keep a Journal of its Proceedings, and from time to+time publish the same, excepting such Parts as may in their Judgment+require Secrecy; and the Yeas and Nays of the Members of either House+on any question shall, at the Desire of one fifth of those Present,+be entered on the Journal.++Neither House, during the Session of Congress, shall, without the Consent+of the other, adjourn for more than three days, nor to any other Place+than that in which the two Houses shall be sitting.++## Section 6++The Senators and Representatives shall receive a Compensation for their+Services, to be ascertained by Law, and paid out of the Treasury of the+United States. They shall in all Cases, except Treason, Felony and Breach+of the Peace, be privileged from Arrest during their Attendance at the+Session of their respective Houses, and in going to and returning from+the same; and for any Speech or Debate in either House, they shall not+be questioned in any other Place.++No Senator or Representative shall, during the Time for which he was+elected, be appointed to any civil Office under the Authority of the+United States, which shall have been created, or the Emoluments whereof+shall have been encreased during such time; and no Person holding any+Office under the United States, shall be a Member of either House during+his Continuance in Office.++## Section 7++All Bills for raising Revenue shall originate in the House of+Representatives; but the Senate may propose or concur with Amendments+as on other Bills.++Every Bill which shall have passed the House of Representatives and the+Senate, shall, before it become a Law, be presented to the President of+the United States: If he approve he shall sign it, but if not he shall+return it, with his Objections to that House in which it shall have+originated, who shall enter the Objections at large on their Journal,+and proceed to reconsider it.  If after such Reconsideration two thirds+of that House shall agree to pass the Bill, it shall be sent, together+with the Objections, to the other House, by which it shall likewise be+reconsidered, and if approved by two thirds of that House, it shall become+a Law. But in all such Cases the Votes of both Houses shall be determined+by Yeas and Nays, and the Names of the Persons voting for and against+the Bill shall be entered on the Journal of each House respectively. If+any Bill shall not be returned by the President within ten Days (Sundays+excepted) after it shall have been presented to him, the Same shall be+a Law, in like Manner as if he had signed it, unless the Congress by+their Adjournment prevent its Return, in which Case it shall not be a Law.++Every Order, Resolution, or Vote to which the Concurrence of the Senate+and House of Representatives may be necessary (except on a question of+Adjournment) shall be presented to the President of the United States;+and before the Same shall take Effect, shall be approved by him, or+being disapproved by him, shall be repassed by two thirds of the Senate+and House of Representatives, according to the Rules and Limitations+prescribed in the Case of a Bill.++## Section 8++The Congress shall have Power To lay and collect Taxes, Duties, Imposts+and Excises, to pay the Debts and provide for the common Defence and+general Welfare of the United States; but all Duties, Imposts and Excises+shall be uniform throughout the United States;++To borrow Money on the credit of the United States;++To regulate Commerce with foreign Nations, and among the several States,+and with the Indian Tribes;++To establish an uniform Rule of Naturalization, and uniform Laws on the+subject of Bankruptcies throughout the United States;++To coin Money, regulate the Value thereof, and of foreign Coin, and fix+the Standard of Weights and Measures;++To provide for the Punishment of counterfeiting the Securities and+current Coin of the United States;++To establish Post Offices and post Roads;++To promote the Progress of Science and useful Arts, by securing for+limited Times to Authors and Inventors the exclusive Right to their+respective Writings and Discoveries;++To constitute Tribunals inferior to the supreme Court;++To define and punish Piracies and Felonies committed on the high Seas,+and Offences against the Law of Nations;++To declare War, grant Letters of Marque and Reprisal, and make Rules+concerning Captures on Land and Water;++To raise and support Armies, but no Appropriation of Money to that Use+shall be for a longer Term than two Years;++To provide and maintain a Navy;++To make Rules for the Government and Regulation of the land and naval+Forces;++To provide for calling forth the Militia to execute the Laws of the Union,+suppress Insurrections and repel Invasions;++To provide for organizing, arming, and disciplining, the Militia, and+for governing such Part of them as may be employed in the Service of+the United States, reserving to the States respectively, the Appointment+of the Officers, and the Authority of training the Militia according to+the discipline prescribed by Congress;++To exercise exclusive Legislation in all Cases whatsoever, over+such District (not exceeding ten Miles square) as may, by Cession of+particular States, and the Acceptance of Congress, become the Seat of+the Government of the United States, and to exercise like Authority over+all Places purchased by the Consent of the Legislature of the State in+which the Same shall be, for the Erection of Forts, Magazines, Arsenals,+dock-Yards, and other needful Buildings;-And++To make all Laws which shall be necessary and proper for carrying into+Execution the foregoing Powers, and all other Powers vested by this+Constitution in the Government of the United States, or in any Department+or Officer thereof.++## Section 9++The Migration or Importation of such Persons as any of the States now+existing shall think proper to admit, shall not be prohibited by the+Congress prior to the Year one thousand eight hundred and eight, but+a Tax or duty may be imposed on such Importation, not exceeding ten+dollars for each Person.++The Privilege of the Writ of Habeas Corpus shall not be suspended, unless+when in Cases of Rebellion or Invasion the public Safety may require it.++No Bill of Attainder or ex post facto Law shall be passed.++No Capitation, or other direct, Tax shall be laid, unless in Proportion+to the Census or enumeration herein before directed to be taken.++No Tax or Duty shall be laid on Articles exported from any State.++No Preference shall be given by any Regulation of Commerce or Revenue to+the Ports of one State over those of another; nor shall Vessels bound to,+or from, one State, be obliged to enter, clear, or pay Duties in another.++No Money shall be drawn from the Treasury, but in Consequence of+Appropriations made by Law; and a regular Statement and Account of the+Receipts and Expenditures of all public Money shall be published from+time to time.++No Title of Nobility shall be granted by the United States: And no+Person holding any Office of Profit or Trust under them, shall, without+the Consent of the Congress, accept of any present, Emolument, Office,+or Title, of any kind whatever, from any King, Prince, or foreign State.++## Section 10++No State shall enter into any Treaty, Alliance, or Confederation;+grant Letters of Marque and Reprisal; coin Money; emit Bills of Credit;+make any Thing but gold and silver Coin a Tender in Payment of Debts;+pass any Bill of Attainder, ex post facto Law, or Law impairing the+Obligation of Contracts, or grant any Title of Nobility.++No State shall, without the Consent of the Congress, lay any Imposts or+Duties on Imports or Exports, except what may be absolutely necessary+for executing its inspection Laws: and the net Produce of all Duties+and Imposts, laid by any State on Imports or Exports, shall be for the+Use of the Treasury of the United States; and all such Laws shall be+subject to the Revision and Control of the Congress.++No State shall, without the Consent of Congress, lay any Duty of Tonnage,+keep Troops, or Ships of War in time of Peace, enter into any Agreement+or Compact with another State, or with a foreign Power, or engage in War,+unless actually invaded, or in such imminent Danger as will not admit+of delay.++# Article II++## Section 1++The executive Power shall be vested in a President of the United States+of America. He shall hold his Office during the Term of four Years, and,+together with the Vice President, chosen for the same Term, be elected,+as follows:++Each State shall appoint, in such Manner as the Legislature thereof+may direct, a Number of Electors, equal to the whole Number of Senators+and Representatives to which the State may be entitled in the Congress:+but no Senator or Representative, or Person holding an Office of Trust+or Profit under the United States, shall be appointed an Elector.++The Electors shall meet in their respective States, and vote by Ballot for+two Persons, of whom one at least shall not be an Inhabitant of the same+State with themselves. And they shall make a List of all the Persons voted+for, and of the Number of Votes for each; which List they shall sign and+certify, and transmit sealed to the Seat of the Government of the United+States, directed to the President of the Senate. The President of the+Senate shall, in the Presence of the Senate and House of Representatives,+open all the Certificates, and the Votes shall then be counted. The Person+having the greatest Number of Votes shall be the President, if such Number+be a Majority of the whole Number of Electors appointed; and if there be+more than one who have such Majority, and have an equal Number of Votes,+then the House of Representatives shall immediately chuse by Ballot one+of them for President; and if no Person have a Majority, then from the+five highest on the List the said House shall in like Manner chuse the+President. But in chusing the President, the Votes shall be taken by+States, the Representatives from each State having one Vote; a quorum+for this Purpose shall consist of a Member or Members from two thirds+of the States, and a Majority of all the States shall be necessary to+a Choice. In every Case, after the Choice of the President, the Person+having the greatest Number of Votes of the Electors shall be the Vice+President. But if there should remain two or more who have equal Votes,+the Senate shall chuse from them by Ballot the Vice-President.++The Congress may determine the Time of chusing the Electors, and the+Day on which they shall give their Votes; which Day shall be the same+throughout the United States.++No Person except a natural born Citizen, or a Citizen of the United+States, at the time of the Adoption of this Constitution, shall be+eligible to the Office of President; neither shall any person be eligible+to that Office who shall not have attained to the Age of thirty five+Years, and been fourteen Years a Resident within the United States.++In Case of the Removal of the President from Office, or of his Death,+Resignation, or Inability to discharge the Powers and Duties of the said+Office, the Same shall devolve on the Vice President, and the Congress may+by Law provide for the Case of Removal, Death, Resignation or Inability,+both of the President and Vice President, declaring what Officer shall+then act as President, and such Officer shall act accordingly, until+the Disability be removed, or a President shall be elected.++The President shall, at stated Times, receive for his Services, a+Compensation, which shall neither be encreased nor diminished during the+Period for which he shall have been elected, and he shall not receive+within that Period any other Emolument from the United States, or any+of them.++Before he enter on the Execution of his Office, he shall take the+following Oath or Affirmation:-"I do solemnly swear (or affirm) that+I will faithfully execute the Office of President of the United States,+and will to the best of my Ability, preserve, protect and defend the+Constitution of the United States."++## Section 2++The President shall be Commander in Chief of the Army and Navy of the+United States, and of the Militia of the several States, when called into+the actual Service of the United States; he may require the Opinion, in+writing, of the principal Officer in each of the executive Departments,+upon any Subject relating to the Duties of their respective Offices,+and he shall have Power to Grant Reprieves and Pardons for Offences+against the United States, except in Cases of Impeachment.++He shall have Power, by and with the Advice and Consent of the Senate,+to make Treaties, provided two thirds of the Senators present concur;+and he shall nominate, and by and with the Advice and Consent of the+Senate, shall appoint Ambassadors, other public Ministers and Consuls,+Judges of the supreme Court, and all other Officers of the United States,+whose Appointments are not herein otherwise provided for, and which shall+be established by Law: but the Congress may by Law vest the Appointment+of such inferior Officers, as they think proper, in the President alone,+in the Courts of Law, or in the Heads of Departments.++The President shall have Power to fill up all Vacancies that may happen+during the Recess of the Senate, by granting Commissions which shall+expire at the End of their next Session.++## Section 3++He shall from time to time give to the Congress Information on the State+of the Union, and recommend to their Consideration such Measures as he+shall judge necessary and expedient; he may, on extraordinary Occasions,+convene both Houses, or either of them, and in Case of Disagreement+between them, with Respect to the Time of Adjournment, he may adjourn them+to such Time as he shall think proper; he shall receive Ambassadors and+other public Ministers; he shall take Care that the Laws be faithfully+executed, and shall Commission all the Officers of the United States.++## Section 4++The President, Vice President and all Civil Officers of the United States,+shall be removed from Office on Impeachment for, and Conviction of,+Treason, Bribery, or other high Crimes and Misdemeanors.++# Article III++## Section 1++The judicial Power of the United States, shall be vested in one supreme+Court, and in such inferior Courts as the Congress may from time to+time ordain and establish. The Judges, both of the supreme and inferior+Courts, shall hold their Offices during good Behaviour, and shall, at+stated Times, receive for their Services, a Compensation, which shall+not be diminished during their Continuance in Office.++## Section 2++The judicial Power shall extend to all Cases, in Law and Equity,+arising under this Constitution, the Laws of the United States, and+Treaties made, or which shall be made, under their Authority; --+to all Cases affecting Ambassadors, other public ministers and+Consuls; -- to all Cases of admiralty and maritime Jurisdiction;+-- to Controversies to which the United States shall be a Party;+-- to Controversies between two or more States; -- between a State+and Citizens of another State; -- between Citizens of different+States; -- between Citizens of the same State claiming Lands under+Grants of different States, and between a State, or the Citizens+thereof, and foreign States, Citizens or Subjects.++In all Cases affecting Ambassadors, other public Ministers and Consuls,+and those in which a State shall be Party, the supreme Court shall+have original Jurisdiction. In all the other Cases before mentioned,+the supreme Court shall have appellate Jurisdiction, both as to Law and+Fact, with such Exceptions, and under such Regulations as the Congress+shall make.++The Trial of all Crimes, except in Cases of Impeachment, shall be by Jury;+and such Trial shall be held in the State where the said Crimes shall+have been committed; but when not committed within any State, the Trial+shall be at such Place or Places as the Congress may by Law have directed.++## Section 3++Treason against the United States, shall consist only in levying War+against them, or in adhering to their Enemies, giving them Aid and+Comfort. No Person shall be convicted of Treason unless on the Testimony+of two Witnesses to the same overt Act, or on Confession in open Court.++The Congress shall have Power to declare the Punishment of Treason, but+no Attainder of Treason shall work Corruption of Blood, or Forfeiture+except during the Life of the Person attainted.++# Article IV++## Section 1++Full Faith and Credit shall be given in each State to the public Acts,+Records, and judicial Proceedings of every other State. And the Congress+may by general Laws prescribe the Manner in which such Acts, Records+and Proceedings shall be proved, and the Effect thereof.++## Section 2++The Citizens of each State shall be entitled to all Privileges and+Immunities of Citizens in the several States.++A Person charged in any State with Treason, Felony, or other Crime,+who shall flee from Justice, and be found in another State, shall on+Demand of the executive Authority of the State from which he fled, be+delivered up, to be removed to the State having Jurisdiction of the Crime.++No Person held to Service or Labour in one State, under the Laws thereof,+escaping into another, shall, in Consequence of any Law or Regulation+therein, be discharged from such Service or Labour, but shall be delivered+up on Claim of the Party to whom such Service or Labour may be due.++## Section 3++New States may be admitted by the Congress into this Union; but no new+State shall be formed or erected within the Jurisdiction of any other+State; nor any State be formed by the Junction of two or more States,+or Parts of States, without the Consent of the Legislatures of the States+concerned as well as of the Congress.++The Congress shall have Power to dispose of and make all needful Rules and+Regulations respecting the Territory or other Property belonging to the+United States; and nothing in this Constitution shall be so construed as+to Prejudice any Claims of the United States, or of any particular State.++## Section 4++The United States shall guarantee to every State in this Union a+Republican Form of Government, and shall protect each of them against+Invasion; and on Application of the Legislature, or of the Executive+(when the Legislature cannot be convened) against domestic Violence.++# Article V++The Congress, whenever two thirds of both Houses shall deem it necessary,+shall propose Amendments to this Constitution, or, on the Application+of the Legislatures of two thirds of the several States, shall call a+Convention for proposing Amendments, which, in either Case, shall be+valid to all Intents and Purposes, as Part of this Constitution, when+ratified by the Legislatures of three fourths of the several States, or+by Conventions in three fourths thereof, as the one or the other Mode of+Ratification may be proposed by the Congress; Provided that no Amendment+which may be made prior to the Year One thousand eight hundred and eight+shall in any Manner affect the first and fourth Clauses in the Ninth+Section of the first Article; and that no State, without its Consent,+shall be deprived of its equal Suffrage in the Senate.++# Article VI++All Debts contracted and Engagements entered into, before the Adoption+of this Constitution, shall be as valid against the United States under+this Constitution, as under the Confederation.++This Constitution, and the Laws of the United States which shall be made+in Pursuance thereof; and all Treaties made, or which shall be made,+under the Authority of the United States, shall be the supreme Law of+the Land; and the Judges in every State shall be bound thereby, any Thing+in the Constitution or Laws of any state to the Contrary notwithstanding.++The Senators and Representatives before mentioned, and the Members of+the several State Legislatures, and all executive and judicial Officers,+both of the United States and of the several States, shall be bound by+Oath or Affirmation, to support this Constitution; but no religious Test+shall ever be required as a Qualification to any Office or public Trust+under the United States.++# Article VII++The Ratification of the Conventions of nine States, shall be sufficient+for the Establishment of this Constitution between the States so ratifying+the Same.

t/text/freedom-of-choice.txt

deleted file mode 100644@@ -1,50 +0,0 @@-A victim of collision on the open sea-Nobody ever said life was free-Sink, swim, go down with the ship-But use your freedom of choice--I'll say it again in the land of the free-Use your freedom of choice-Your freedom of choice--In ancient Rome-There was a poem-About a dog-Who found two bones-He picked at one-He licked the other-He went in circles-He dropped dead--Freedom of choice-Is what you got-Freedom of choice!--Then if you've got it, you don't want it-Seems to be the rule of thumb-Don't be tricked by what you see-You've got two ways to go--I'll say it again in the land of the free-Use your freedom of choice-Freedom of choice--Freedom of choice-Is what you got-Freedom of choice!--In ancient Rome-There was a poem-About a dog-Who found two bones-He picked at one-He licked the other-He went in circles-He dropped dead--Freedom of choice-Is what you got-Freedom from choice-Is what you want--    -- "Freedom Of Choice", Devo

t/text/gettysburg.txt

new file mode 100644@@ -0,0 +1,24 @@+Four score and seven years ago our fathers brought forth on this+continent, a new nation, conceived in Liberty, and dedicated to the+proposition that all men are created equal.++Now we are engaged in a great civil war, testing whether that nation,+or any nation so conceived and so dedicated, can long endure. We are met+on a great battle-field of that war. We have come to dedicate a portion+of that field, as a final resting place for those who here gave their+lives that that nation might live. It is altogether fitting and proper+that we should do this.++But, in a larger sense, we can not dedicate -- we can not consecrate --+we can not hallow -- this ground. The brave men, living and dead, who+struggled here, have consecrated it, far above our poor power to add or+detract. The world will little note, nor long remember what we say here,+but it can never forget what they did here. It is for us the living,+rather, to be dedicated here to the unfinished work which they who+fought here have thus far so nobly advanced. It is rather for us to be+here dedicated to the great task remaining before us -- that from these+honored dead we take increased devotion to that cause for which they gave+the last full measure of devotion -- that we here highly resolve that+these dead shall not have died in vain -- that this nation, under God,+shall have a new birth of freedom -- and that government of the people,+by the people, for the people, shall not perish from the earth.

t/text/me-and-bobbie-mcgee.txt

deleted file mode 100644@@ -1,32 +0,0 @@-Busted flat in Baton Rouge, waitin' for a train-I was feelin' near as faded as my jeans-Bobbie thumbed a diesel down just before it rained-Took us all the way to New Orleans-I pulled my harpoon out of my dirty red bandana-I was playin' soft while Bobbie sang the blues-Windshield wipers slappin' time-Holdin' Bobbie's hand in mine-We sang every song that driver knew--    Freedom's just another word for nothing left to lose-    Nothin' don't mean nothin' if it ain't free-    And feelin' good was easy, Lord, when she sang the blues-    Feeling good was good enough for me-    Good enough for me and my Bobbie McGee--From the Kentucky coal mines to the California sun-Bobbie shared the secrets of my soul-Through all kinds of weather and everything we done-Bobbie baby kept me from the cold-One day up near Salinas, Lord, I let her slip away-She's looking for that home and I hope she finds it-But I'd trade all of my tomorrows for one single yesterday-To be holding Bobbie's body next to mine--    Freedom's just another word for nothing left to lose-    Nothin' don't mean nothin' if it ain't free-    And feelin' good was easy, Lord, when she sang the blues-    Feeling good was good enough for me-    Good enough for me and my Bobbie McGee--    -- "Me & Bobbie McGee," Kris Kristofferson

t/text/ozymandias.txt

new file mode 100644@@ -0,0 +1,14 @@+I met a traveller from an antique land+Who said: Two vast and trunkless legs of stone+Stand in the desert... Near them, on the sand,+Half sunk, a shattered visage lies, whose frown,+And wrinkled lip, and sneer of cold command,+Tell that its sculptor well those passions read+Which yet survive, stamped on these lifeless things,+The hand that mocked them, and the heart that fed:+And on the pedestal these words appear:+'My name is Ozymandias, king of kings:+Look on my works, ye Mighty, and despair!'+Nothing beside remains. Round the decay+Of that colossal wreck, boundless and bare+The lone and level sands stretch far away.

t/text/raven.txt

new file mode 100644@@ -0,0 +1,125 @@+Once upon a midnight dreary, while I pondered, weak and weary,+Over many a quaint and curious volume of forgotten lore, --+While I nodded, nearly napping, suddenly there came a tapping,+As of some one gently rapping, rapping at my chamber door.+"'Tis some visitor," I muttered, "tapping at my chamber door;+    Only this and nothing more."++Ah, distinctly I remember it was in the bleak December+And each separate dying ember wrought its ghost upon the floor.+Eagerly I wished the morrow; -- vainly I had sought to borrow+From my books surcease of sorrow -- sorrow for the lost Lenore,+For the rare and radiant maiden whom the angels name Lenore:+    Nameless here for evermore.++And the silken sad uncertain rustling of each purple curtain+Thrilled me -- filled me with fantastic terrors never felt before;+So that now, to still the beating of my heart, I stood repeating+"'T is some visitor entreating entrance at my chamber door,+Some late visitor entreating entrance at my chamber door:+    This it is and nothing more."++Presently my soul grew stronger; hesitating then no longer,+"Sir," said I, "or Madam, truly your forgiveness I implore;+But the fact is I was napping, and so gently you came rapping,+And so faintly you came tapping, tapping at my chamber door,+That I scarce was sure I heard you" -- here I opened wide the door: --+    Darkness there and nothing more.++Deep into that darkness peering, long I stood there wondering, fearing,+Doubting, dreaming dreams no mortals ever dared to dream before;+But the silence was unbroken, and the stillness gave no token,+And the only word there spoken was the whispered word, "Lenore?"+This I whispered, and an echo murmured back the word, "Lenore:"+    Merely this and nothing more.++Back into the chamber turning, all my soul within me burning,+Soon again I heard a tapping somewhat louder than before.+"Surely," said I, "surely that is something at my window lattice;+Let me see, then, what thereat is, and this mystery explore;+Let my heart be still a moment and this mystery explore:+    'T is the wind and nothing more."++Open here I flung the shutter, when, with many a flirt and flutter,+In there stepped a stately Raven of the saintly days of yore.+Not the least obeisance made he; not a minute stopped or stayed he;+But, with mien of lord or lady, perched above my chamber door,+Perched upon a bust of Pallas just above my chamber door:+    Perched, and sat, and nothing more.++Then this ebony bird beguiling my sad fancy into smiling+By the grave and stern decorum of the countenance it wore,+"Though thy crest be shorn and shaven, thou," I said, "art sure no craven,+Ghastly grim and ancient Raven wandering from the Nightly shore:+Tell me what thy lordly name is on the Night's Plutonian shore!"+    Quoth the Raven, "Nevermore."++Much I marvelled this ungainly fowl to hear discourse so plainly,+Though its answer little meaning -- little relevancy bore;+For we cannot help agreeing that no living human being+Ever yet was blessed with seeing bird above his chamber door,+Bird or beast upon the sculptured bust above his chamber door,+    With such name as "Nevermore."++But the Raven, sitting lonely on the placid bust, spoke only+That one word, as if his soul in that one word he did outpour.+Nothing further then he uttered, not a feather then he fluttered,+Till I scarcely more than muttered, -- "Other friends have flown before;+On the morrow he will leave me, as my Hopes have flown before."+    Then the bird said, "Nevermore."++Startled at the stillness broken by reply so aptly spoken,+"Doubtless," said I, "what it utters is its only stock and store,+Caught from some unhappy master whom unmerciful Disaster+Followed fast and followed faster till his songs one burden bore:+Till the dirges of his Hope that melancholy burden bore+    Of 'Never -- nevermore.'++But the Raven still beguiling all my fancy into smiling,+Straight I wheeled a cushioned seat in front of bird and bust and door;+Then, upon the velvet sinking, I betook myself to linking+Fancy unto fancy, thinking what this ominous bird of yore,+What this grim, ungainly, ghastly, gaunt, and ominous bird of yore+    Meant in croaking "Nevermore."++This I sat engaged in guessing, but no syllable expressing+To the fowl whose fiery eyes now burned into my bosom's core;+This and more I sat divining, with my head at ease reclining+On the cushion's velvet lining that the lamplight gloated o'er,+But whose velvet violet lining with the lamp-light gloating o'er+    She shall press, ah, nevermore!++Then, methought, the air grew denser, perfumed from an unseen censer+Swung by seraphim whose foot-falls tinkled on the tufted floor.+"Wretch," I cried, "thy God hath lent thee -- by these angels he hath sent thee+Respite-respite and nepenthe from thy memories of Lenore!"+Quaff, oh quaff this kind nepenthe, and forget this lost Lenore."+    Quoth the Raven, "Nevermore."++"Prophet!" said I, "thing of evil! prophet still, if bird or devil!+Whether Tempter sent, or whether tempest tossed thee here ashore,+Desolate yet all undaunted, on this desert land enchanted+On this home by Horror haunted -- tell me truly, I implore:+Is there -- is there balm in Gilead? -- tell me -- tell me, I implore!"+    Quoth the Raven, "Nevermore."++"Prophet!" said I, "thing of evil -- prophet still, if bird or devil!+By that Heaven that bends above us, by that God we both adore,+Tell this soul with sorrow laden if, within the distant Aidenn,+It shall clasp a sainted maiden whom the angels name Lenore:+Clasp a rare and radiant maiden whom the angels name Lenore!"+    Quoth the Raven, "Nevermore."++"Be that word our sign of parting, bird or fiend!" I shrieked, upstarting:+"Get thee back into the tempest and the Night's Plutonian shore!+Leave no black plume as a token of that lie thy soul hath spoken!+Leave my loneliness unbroken! quit the bust above my door!+Take thy beak from out my heart, and take thy form from off my door!"+    Quoth the Raven, "Nevermore."++And the Raven, never flitting, still is sitting, still is sitting+On the pallid bust of Pallas just above my chamber door;+And his eyes have all the seeming of a demon's that is dreaming,+And the lamp-light o'er him streaming throws his shadow on the floor:+And my soul from out that shadow that lies floating on the floor+    Shall be lifted--nevermore!

t/text/science-of-myth.txt

deleted file mode 100644@@ -1,26 +0,0 @@-If you've ever questioned beliefs that you've hold, you're not alone-But you oughta realize that every myth is a metaphor-In the case of Christianity and Judaism there exists the belief-That spiritual matters are enslaved to history--The Buddhists believe that the functional aspects override the myth-While other religions use the literal core to build foundations with-See, half the world sees the myth as fact, and it's seen as a lie by the other half-And the simple truth is that it's none of that 'cause-Somehow no matter what the world keeps turning-Somehow we get by without ever learning--Science and religion are not mutually exclusive-In fact, for better understanding we take the facts of science and apply them-And if both factors keep evolving then we continue getting information-But closing off the possibilities makes it hard to see the bigger picture--Consider the case of the woman whose faith helped her make it through-When she was raped and cut up, left for dead in her trunk, her beliefs held true-It doesn't matter if it's real or not-'cause some things are better left without a doubt-And if it works, then it gets the job done-Somehow no matter what the world keeps turning-Somehow we get by without ever learning--    -- "The Science Of Myth", Screeching Weasel

t/text/shut-up-be-happy.txt

deleted file mode 100644@@ -1,26 +0,0 @@-We interrupt this program with a special bulletin:-America is now under martial law.-All Constitutional rights have been suspended.-Stay in your homes.-Do not attempt to contact loved ones, insurance agents or attorneys.-Shut up.-Do not attempt to think or depression may occur.-Stay in your homes.-Curfew is at 7 PM sharp after work.-Anyone caught outside the gates of their subdivision sector after curfew will be shot.-Remain calm.  Do not panic.-Your neighborhood watch officer will be by to collect urine samples in the morning.-Anyone caught intefering with the collection of urine samples will be shot.-Stay in your homes, remain calm.-The number one enemy of progress is questions.-National security is more important than individual will.-All sports broadcasts will proceed as normal.-No more than two people may gather anywhere without permission.-Use only the drugs prescribed by your boss or supervisor.-Shut up! Be happy.-Obey all orders without question.-The comfort you've demanded is now mandatory.-Be happy.-At last everything is done for you.--    -- "Shut Up, Be Happy", Jello Biafra

t/trailing-whitespace.t

@@ -43,14 +43,14 @@ subtest 'whitespace+dollar with -L' => sub {     plan tests => 1;      my @expected = line_split( <<'EOF' );-t/text/4th-of-july.txt-t/text/boy-named-sue.txt-t/text/freedom-of-choice.txt-t/text/me-and-bobbie-mcgee.txt+t/text/amontillado.txt+t/text/bill-of-rights.txt+t/text/constitution.txt+t/text/gettysburg.txt t/text/number.txt t/text/numbered-text.txt-t/text/science-of-myth.txt-t/text/shut-up-be-happy.txt+t/text/ozymandias.txt+t/text/raven.txt EOF      my @files = qw( t/text/ );@@ -63,35 +63,23 @@ subtest 'whitespace+dollar with -v' => sub {     plan tests => 4;      my @expected = line_split( <<'EOF' );-If you've ever questioned beliefs that you've hold, you're not alone-But you oughta realize that every myth is a metaphor-In the case of Christianity and Judaism there exists the belief-That spiritual matters are enslaved to history--The Buddhists believe that the functional aspects override the myth-While other religions use the literal core to build foundations with-See, half the world sees the myth as fact, and it's seen as a lie by the other half-And the simple truth is that it's none of that 'cause-Somehow no matter what the world keeps turning-Somehow we get by without ever learning--Science and religion are not mutually exclusive-In fact, for better understanding we take the facts of science and apply them-And if both factors keep evolving then we continue getting information-But closing off the possibilities makes it hard to see the bigger picture--Consider the case of the woman whose faith helped her make it through-When she was raped and cut up, left for dead in her trunk, her beliefs held true-It doesn't matter if it's real or not-'cause some things are better left without a doubt-And if it works, then it gets the job done-Somehow no matter what the world keeps turning-Somehow we get by without ever learning--    -- "The Science Of Myth", Screeching Weasel+I met a traveller from an antique land+Who said: Two vast and trunkless legs of stone+Stand in the desert... Near them, on the sand,+Half sunk, a shattered visage lies, whose frown,+And wrinkled lip, and sneer of cold command,+Tell that its sculptor well those passions read+Which yet survive, stamped on these lifeless things,+The hand that mocked them, and the heart that fed:+And on the pedestal these words appear:+'My name is Ozymandias, king of kings:+Look on my works, ye Mighty, and despair!'+Nothing beside remains. Round the decay+Of that colossal wreck, boundless and bare+The lone and level sands stretch far away. EOF -    my @files = qw( t/text/science-of-myth.txt );+    my @files = qw( t/text/ozymandias.txt );      for my $context ( undef, '-A', '-B', '-C' ) {         my @args = qw( \s$ -v );

todo.txt

new file mode 100644@@ -0,0 +1,12 @@+t/ack-color.t              (Wstat: 1024 Tests: 16 Failed: 4)        +  Failed tests:  13-16+  Non-zero exit status: 4+t/ack-proximate.t          (Wstat: 1280 Tests: 5 Failed: 5)+  Failed tests:  1-5+  Non-zero exit status: 5+t/ack-u.t                  (Wstat: 768 Tests: 4 Failed: 3)+  Failed tests:  2-4+  Non-zero exit status: 3+t/ack-underline.t          (Wstat: 1024 Tests: 4 Failed: 4)+  Failed tests:  1-4+  Non-zero exit status: 4