Commits

shl...@52c325ad-5fd0-0310-8a0f-c43feede02cc  committed 2a88a51

Changed the name of t/findrule.t to t/findorule.t.

This involved many changes in t/*.t which depend on the exact structure
of the distribution. <sigh />

  • Participants
  • Parent commits d3adae0

Comments (0)

Files changed (5)

File File-Find-Object-Rule/MANIFEST

 README
 scripts/findorule
 t/File-Find-Rule.t
-t/findrule.t
+t/findorule.t
 t/foobar
 t/lib/File/Find/Object/Rule/Test/ATeam.pm

File File-Find-Object-Rule/t/File-Find-Rule.t

 use Test::More tests => 41;
 
 my $class;
-my @tests = qw( t/File-Find-Rule.t t/findrule.t );
+my @tests = qw( t/File-Find-Rule.t t/findorule.t );
 BEGIN {
     $class = 'File::Find::Object::Rule';
     use_ok($class)
   ->file
   ->not( $class->name( qr/^[^.]{1,8}(\.[^.]{0,3})?$/ ) )
   ->maxdepth(1)
-  ->exec(sub { length == 6 || length > 10 });
+  ->exec(sub { length == 6 || length > 11 });
 is_deeply( [ $f->in('t') ],
            [ 't/File-Find-Rule.t' ],
            "not" );
   ->file
   ->not_name( qr/^[^.]{1,8}(\.[^.]{0,3})?$/ )
   ->maxdepth(1)
-  ->exec(sub { length == 6 || length > 10 });
+  ->exec(sub { length == 6 || length > 11 });
 is_deeply( [ $f->in('t') ],
            [ 't/File-Find-Rule.t' ],
            "not_*" );
 }
 
 # negating in the procedural interface
-is_deeply( [ find( file => '!name' => qr/^[^.]{1,8}(\.[^.]{0,3})?$/,
+is_deeply( [ find( file => '!name' => qr/^[^.]{1,9}(\.[^.]{0,3})?$/,
                    maxdepth => 1,
                    in => 't' ) ],
            [ 't/File-Find-Rule.t' ],

File File-Find-Object-Rule/t/findorule.t

+#!perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 6;
+use File::Spec;
+
+# extra tests for findorule.  these are more for testing the parsing code.
+
+sub run ($) {
+    my $expr = shift;
+    my $script = File::Spec->catfile(
+        File::Spec->curdir(), "scripts", "findorule"
+    );
+
+    [ sort split /\n/, `$^X -Mblib $script $expr 2>&1` ];
+}
+
+is_deeply(run 't -file -name foobar', [ 't/foobar' ],
+          '-file -name foobar');
+
+is_deeply(run 't -maxdepth 0 -directory',
+          [ 't' ], 'last clause has no args');
+
+
+{
+    local $TODO = "Win32 cmd.exe hurts my brane"
+      if ($^O =~ m/Win32/ || $^O eq 'dos');
+
+    is_deeply(run 't -file -name \( foobar \*.t \)',
+              [ qw( t/File-Find-Rule.t t/findorule.t t/foobar ) ],
+              'grouping ()');
+
+    is_deeply(run 't -name \( -foo foobar \)',
+              [ 't/foobar' ], 'grouping ( -literal )');
+}
+
+is_deeply(run 't -file -name foobar baz',
+          [ "unknown option 'baz'" ], 'no implicit grouping');
+
+is_deeply(run 't -maxdepth 0 -name -file',
+          [], 'terminate at next -');

File File-Find-Object-Rule/t/findrule.t

-#!perl
-
-use strict;
-use warnings;
-
-use Test::More tests => 6;
-use File::Spec;
-
-# extra tests for findrule.  these are more for testing the parsing code.
-
-sub run ($) {
-    my $expr = shift;
-    my $script = File::Spec->catfile(
-        File::Spec->curdir(), "scripts", "findorule"
-    );
-
-    [ sort split /\n/, `$^X -Mblib $script $expr 2>&1` ];
-}
-
-is_deeply(run 't -file -name foobar', [ 't/foobar' ],
-          '-file -name foobar');
-
-is_deeply(run 't -maxdepth 0 -directory',
-          [ 't' ], 'last clause has no args');
-
-
-{
-    local $TODO = "Win32 cmd.exe hurts my brane"
-      if ($^O =~ m/Win32/ || $^O eq 'dos');
-
-    is_deeply(run 't -file -name \( foobar \*.t \)',
-              [ qw( t/File-Find-Rule.t t/findrule.t t/foobar ) ],
-              'grouping ()');
-
-    is_deeply(run 't -name \( -foo foobar \)',
-              [ 't/foobar' ], 'grouping ( -literal )');
-}
-
-is_deeply(run 't -file -name foobar baz',
-          [ "unknown option 'baz'" ], 'no implicit grouping');
-
-is_deeply(run 't -maxdepth 0 -name -file',
-          [], 'terminate at next -');

File File-Find-Object-Rule/t/foobar

-10 bytes.
+10 bytess.