220820.19 · eb7672bcc5f2a20d27cedec33deba741de2d1a79
Add mutex of -f and -i/-I. Also --smart-case but it does not work.
reading declarations
@@ -14,6 +14,7 @@ sub invalid_combinations { my @file_lists = qw( -f -g -l -L ); my @output = qw( -o --output ); my @fg = qw( -f -g );+ my @case = qw( -i -I --smart-case ); return ( [qw(-l)] => [@context, @file_lists, @pretty, @filename, @output, qw(--passthru --column --show-types)],@@ -27,7 +28,7 @@ sub invalid_combinations { [qw(-c)] => [@context, @pretty, @fg, qw(--column)], [qw(--column)] => [@file_lists], [@context] => [@file_lists],- [qw(-f)] => [qw(-v)],+ [qw(-f)] => [qw(-v), @case], [@fg] => [@fg, @pretty, qw(-x -c -u --files-from)], [qw(-p)] => [@context, @file_lists, qw(--passthru -c)], [qw(-v)] => [qw(--column -o --output --passthru)],
@@ -898,6 +898,9 @@ sub mutex_options { g => 1, l => 1, },+ I => {+ f => 1,+ }, L => { A => 1, B => 1,@@ -962,6 +965,7 @@ sub mutex_options { B => 1, C => 1, H => 1,+ I => 1, L => 1, break => 1, c => 1,@@ -972,6 +976,7 @@ sub mutex_options { group => 1, h => 1, heading => 1,+ i => 1, l => 1, m => 1, match => 1,@@ -979,6 +984,7 @@ sub mutex_options { output => 1, p => 1, passthru => 1,+ 'smart-case' => 1, u => 1, v => 1, x => 1,@@ -1033,6 +1039,9 @@ sub mutex_options { g => 1, l => 1, },+ i => {+ f => 1,+ }, l => { A => 1, B => 1,@@ -1142,6 +1151,9 @@ sub mutex_options { o => 1, output => 1, },+ 'smart-case' => {+ f => 1,+ }, u => { f => 1, g => 1,
@@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 3;+use Test::More tests => 2; use lib 't'; use Util;@@ -62,24 +62,6 @@ subtest 'is:xxx matching' => sub { }; -subtest 'match:xxx matching' => sub {- plan tests => 6;-- # The match is case-insensitive, unaffected by -i or -I.- for my $u ( 'u', 'U' ) {- for my $I ( '-i', '-I', undef ) {- my @args = ( qw( -f t/swamp/groceries ), "--ignore-file=match:$u" );- push( @args, $I ) if defined $I;- ack_sets_match(- [ @args ],- [ @meat ],- 'Should only match files with do not have "u" in them: ' . join( ' ', map { $_ // 'undef' } @args )- );- }- }-};-- subtest 'Invalid invocation' => sub { plan tests => 8;