@ 11d698f

250205.4 · afafa2da65e0f70507454bd67161a9b14b94d6bf

Move ack-h to yaml

reading declarations

MANIFEST

@@ -44,7 +44,7 @@ t/ack-f.yaml t/ack-files-from.t t/ack-g.t t/ack-group.t-t/ack-h.t+t/ack-h.yaml t/ack-help-types.t t/ack-help.t t/ack-i.barfly

t/ack-h.t

deleted file mode 100644@@ -1,72 +0,0 @@-#!perl--use strict;-use warnings;--use Test::More tests => 12;--use lib 't';-use Util;--prep_environment();--NO_SWITCHES_ONE_FILE: {-    my @expected = line_split( <<'HERE' );-use strict;-HERE--    my @files = qw( t/swamp/options.pl );-    my @args = qw( strict );-    my @results = run_ack( @args, @files );--    lists_match( \@results, \@expected, 'Looking for strict in one file' );-}---NO_SWITCHES_MULTIPLE_FILES: {-    my $target_file = reslash( 't/swamp/options.pl' );-    my @expected = line_split( <<"HERE" );-$target_file:2:use strict;-HERE--    my @files = qw( t/swamp/options.pl t/swamp/pipe-stress-freaks.F );-    my @args = qw( strict );-    my @results = run_ack( @args, @files );--    lists_match( \@results, \@expected, 'Looking for strict in multiple files' );-}---WITH_SWITCHES_ONE_FILE: {-    my $target_file = reslash( 't/swamp/options.pl' );-    for my $opt ( qw( -H --with-filename ) ) {-        my @expected = line_split( <<"HERE" );-$target_file:2:use strict;-HERE--        my @files = qw( t/swamp/options.pl );-        my @args = ( $opt, qw( strict ) );-        my @results = run_ack( @args, @files );--        lists_match( \@results, \@expected, "Looking for strict in one file with $opt" );-    }-}---WITH_SWITCHES_MULTIPLE_FILES: {-    for my $opt ( qw( -h --no-filename ) ) {-        my @expected = line_split( <<'HERE' );-use strict;-HERE--        my @files = qw( t/swamp/options.pl t/swamp/crystallography-weenies.f );-        my @args = ( $opt, qw( strict ) );-        my @results = run_ack( @args, @files );--        lists_match( \@results, \@expected, "Looking for strict in multiple files with $opt" );-    }-}--done_testing();--exit 0;

t/ack-h.yaml

new file mode 100644@@ -0,0 +1,27 @@+---+name: No switches, one file+args: strict t/swamp/options.pl+stdout: |+  use strict;++---+name: No switches, multiple files+args: strict t/swamp/options.pl t/swamp/pipe-stress-freaks.F+stdout: |+  t/swamp/options.pl:2:use strict;++---+name: With switches, one file+args:+  - strict t/swamp/options.pl -H+  - strict t/swamp/options.pl --with-filename+stdout: |+  t/swamp/options.pl:2:use strict;++---+name: With switches, multiple files+args:+  - strict t/swamp/options.pl t/swamp/crystallography-weenies.f -h+  - strict t/swamp/options.pl t/swamp/crystallography-weenies.f --no-filename+stdout: |+  use strict;

t/yaml.t

@@ -3,7 +3,7 @@ use warnings; use strict; -use Test::More tests => 13;+use Test::More tests => 14;  use lib 't'; use Util;