@ 11d698f

250205.5 · ab5c7803c58e6ae58a56960812aeb76fc106dd82

Moving some booleans over to yaml

reading declarations

MANIFEST

@@ -78,6 +78,7 @@ t/anchored.t t/bad-ackrc-opt.t t/basic.yaml t/boolean.t+t/boolean.yaml t/build_regex.t t/command-line-files.t t/config-backwards-compat.t

t/Util.pm

@@ -1267,7 +1267,7 @@ sub permutate {      return map {         my ($f, @r) = list_with_x_first($_, @_);-        map [$f, @$_], permutate(@r);+        map [$f, @{$_}], permutate(@r);     } 0..$#_; } @@ -1288,6 +1288,11 @@ sub read_tests {     for my $test ( @tests ) {         $test->{stdout} = _lineify( $test->{stdout} ); +        if ( my $n = $test->{'indent-stdout'} ) {+            my $indent = ' ' x $n;+            $_ = "$indent$_" for @{$test->{stdout}};+        }+         $test->{args} = _split_args( $test->{args} );          # Assume successful run.@@ -1333,6 +1338,7 @@ sub _validate_test {     my @valid_keys = qw(         args         exitcode+        indent-stdout         name         ordered         stderr

t/boolean.t

@@ -9,80 +9,10 @@ use Test::More; use lib 't'; use Util; -plan tests => 104;+plan tests => 100;  prep_environment(); -NO_BOOLEANS: {-    my @expected = line_split( <<'HERE' );-    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!-HERE--    my @files = qw( t/text/raven.txt );--    my @args = qw( -i nevermore );--    ack_sets_match( [ @args, @files ], \@expected, 'No booleans' );-}---NEVERMORE_NOT_QUOTH: {-    my @expected = line_split( <<'HERE' );-    With such name as "Nevermore."-    Then the bird said, "Nevermore."-    Of 'Never -- nevermore.'-    Meant in croaking "Nevermore."-    She shall press, ah, nevermore!-    Shall be lifted--nevermore!-HERE--    my @files = qw( t/text/raven.txt );--    my @args = qw( -i nevermore --not quoth );--    ack_sets_match( [ @args, @files ], \@expected, 'Nevermore not quoth' );-}---NEVERMORE_NOT_QUOTH_NOT_THE: {-    my @expected = line_split( <<'HERE' );-    With such name as "Nevermore."-    Of 'Never -- nevermore.'-    Meant in croaking "Nevermore."-    She shall press, ah, nevermore!-    Shall be lifted--nevermore!-HERE--    my @files = qw( t/text/raven.txt );--    my @args = qw( -i nevermore --not quoth --not the );--    ack_sets_match( [ @args, @files ], \@expected, 'Nevermore not quoth not the' );-}---QUOTH_NOT_NEVERMORE: {-    my @expected = line_split( <<'HERE' );-HERE--    my @files = qw( t/text/raven.txt );--    my @args = qw( -i quoth --not nevermore );--    ack_sets_match( [ @args, @files ], \@expected, 'Quoth not nevermore' );-}-- NOT: {     _movies_are(         [qw( Murray )],

t/boolean.yaml

new file mode 100644@@ -0,0 +1,48 @@+---+name: No booleans+args: -i nevermore t/text/raven.txt+ordered: true+indent-stdout: 4+stdout: |+  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!++---+name: Nevermore not quoth+args: -i nevermore --not quoth t/text/raven.txt+ordered: true+indent-stdout: 4+stdout: |+  With such name as "Nevermore."+  Then the bird said, "Nevermore."+  Of 'Never -- nevermore.'+  Meant in croaking "Nevermore."+  She shall press, ah, nevermore!+  Shall be lifted--nevermore!++---+name: Nevermore not quoth not the+args: -i nevermore --not quoth --not the t/text/raven.txt+ordered: true+indent-stdout: 4+stdout: |+  With such name as "Nevermore."+  Of 'Never -- nevermore.'+  Meant in croaking "Nevermore."+  She shall press, ah, nevermore!+  Shall be lifted--nevermore!++---+name: Quoth not nevermore+args: quoth --not nevermore -i t/text/raven.txt+exitcode: 1+stdout: ""

t/yaml.t

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