Skip to content

Commit

Permalink
No signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
petdance committed Nov 22, 2024
1 parent ff55e47 commit 4dd4a18
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions t/ack-boolean.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use warnings;
use strict;
use experimental 'signatures';

use Test::More tests => 79;

Expand Down Expand Up @@ -106,6 +105,15 @@ OR: {
]
);

_movies_are(
[qw( Fisher --or Crystal )],
[
'The Blues Brothers',
'This is Spinal Tap',
'When Harry Met Sally',
]
);

# One of the OR options doesn't exist.
_movies_are(
[qw( Crystal --or Hemsworth )],
Expand Down Expand Up @@ -160,18 +168,26 @@ done_testing();
exit 0;


sub _movies_are( $args, $exp ) {
sub _movies_are {
local $Test::Builder::Level = $Test::Builder::Level + 1;

my $args = shift;
my $exp = shift;

my @base_args = qw( -w -i --noenv );
my @files = ( reslash( 't/text/movies.txt' ) );
my @files = reslash( 't/text/movies.txt' );
my @got = run_ack( @base_args, @{$args}, @files );

s/:.+// for @got;

is_deeply( \@got, $exp, join( ' ', @{$args} ) );
return is_deeply( \@got, $exp, join( ' ', @{$args} ) ) || die;
}


sub _argjoin( $opt, $args ) {
sub _argjoin {
my $opt = shift;
my $args = shift;

my @args = map { ($_, $opt) } @{$args};

pop @args;
Expand Down

0 comments on commit 4dd4a18

Please sign in to comment.