File-Find/t/find.t: reindent after adding a SKIP block tonyc/134295-win32-blocks
authorTony Cook <tony@develop-help.com>
Mon, 22 Jul 2019 05:47:57 +0000 (15:47 +1000)
committerTony Cook <tony@develop-help.com>
Mon, 22 Jul 2019 05:47:57 +0000 (15:47 +1000)
ext/File-Find/t/find.t

index bca797e..0a73552 100644 (file)
@@ -1028,47 +1028,47 @@ if ($^O eq 'MSWin32') {
     closedir $ROOT_DIR;
   SKIP:
     {
-    my $created_file;
-    unless (defined $expected_first_file) {
-        $expected_first_file = '__perl_File_Find_test.tmp';
-        open(F, ">", "/$expected_first_file") && close(F)
-            or skip "cannot create file in root directory: $!", 8;
-        $created_file = 1;
-    }
+        my $created_file;
+        unless (defined $expected_first_file) {
+            $expected_first_file = '__perl_File_Find_test.tmp';
+            open(F, ">", "/$expected_first_file") && close(F)
+                or skip "cannot create file in root directory: $!", 8;
+            $created_file = 1;
+        }
 
-    # Run F:F:f with/without no_chdir for each possible style of root path.
-    # NB. If HOME were "/", then an inadvertent chdir('') would fluke the
-    # expected result, so ensure it is something else:
-    local $ENV{HOME} = $orig_dir;
-    foreach my $no_chdir (0, 1) {
-        foreach my $root_dir ("/", "\\", "$drive/", "$drive\\") {
-            eval {
-                File::Find::find({
-                    'no_chdir' => $no_chdir,
-                    'preprocess' => sub { return sort @_ },
-                    'wanted' => sub {
-                        -f or return; # the first call is for $root_dir itself.
-                        my $got = $File::Find::name;
-                        my $exp = "$root_dir$expected_first_file";
-                        print "# no_chdir=$no_chdir $root_dir '$got'\n";
-                        is($got, $exp,
-                            "Win32: Run 'find' with 'no_chdir' set to $no_chdir" );
-                        die "done"; # do not process the entire drive!
-                    },
-                }, $root_dir);
-            };
-            # If F:F:f did not die "done" then it did not Check() either.
-            unless ($@ and $@ =~ /done/) {
-                print "# no_chdir=$no_chdir $root_dir ",
-                    ($@ ? "error: $@" : "no files found"), "\n";
-                ok(0, "Win32: 0");
+        # Run F:F:f with/without no_chdir for each possible style of root path.
+        # NB. If HOME were "/", then an inadvertent chdir('') would fluke the
+        # expected result, so ensure it is something else:
+        local $ENV{HOME} = $orig_dir;
+        foreach my $no_chdir (0, 1) {
+            foreach my $root_dir ("/", "\\", "$drive/", "$drive\\") {
+                eval {
+                    File::Find::find({
+                        'no_chdir' => $no_chdir,
+                            'preprocess' => sub { return sort @_ },
+                            'wanted' => sub {
+                                -f or return; # the first call is for $root_dir itself.
+                                my $got = $File::Find::name;
+                                my $exp = "$root_dir$expected_first_file";
+                                print "# no_chdir=$no_chdir $root_dir '$got'\n";
+                                is($got, $exp,
+                                   "Win32: Run 'find' with 'no_chdir' set to $no_chdir" );
+                                die "done"; # do not process the entire drive!
+                        },
+                    }, $root_dir);
+                };
+                # If F:F:f did not die "done" then it did not Check() either.
+                unless ($@ and $@ =~ /done/) {
+                    print "# no_chdir=$no_chdir $root_dir ",
+                        ($@ ? "error: $@" : "no files found"), "\n";
+                    ok(0, "Win32: 0");
+                }
             }
         }
-    }
-    if ($created_file) {
-        unlink("/$expected_first_file")
-            or warn "can't unlink /$expected_first_file: $!\n";
-    }
+        if ($created_file) {
+            unlink("/$expected_first_file")
+                or warn "can't unlink /$expected_first_file: $!\n";
+        }
     }
 }