Skip to content

Commit fb7205d

Browse files
committed
Attempted reformat of yes.t to match preferred coding style.
1 parent af51ea4 commit fb7205d

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

t/yes/yes.t

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ subtest 'test yes' => sub {
1515
if (defined($ENV{YESPATH})) {
1616
$yes_path = $ENV{YESPATH};
1717
diag "Testing yes at $ENV{YESPATH}";
18-
}
18+
}
1919

2020
ok -e $yes_path && -f $yes_path, "found 'yes' program at $yes_path"
2121
or return; # fail rest of script
@@ -25,9 +25,9 @@ subtest 'test yes' => sub {
2525
skip "Don't run fork test on Windows", 1 if $^O eq 'MSWin32';
2626
fork_yes($yes_path);
2727
fork_yes($yes_path, 'iluvperl');
28-
}
28+
}
29+
};
2930
};
30-
};
3131

3232
sub fork_yes {
3333
my ($yes_path, $yes_str) = @_;
@@ -41,7 +41,7 @@ sub fork_yes {
4141
# NOTE <> must be called in scalar context to prevent blocking.
4242
my $line = <$child>;
4343
push @lines, $line;
44-
}
44+
}
4545

4646
is $lines[0], "$yes_str\n", "First line is '$yes_str'.\n"; # superfluous?
4747
is scalar(@lines), 10, 'Expected no. of output lines (10).';
@@ -50,11 +50,12 @@ sub fork_yes {
5050
is $count_of_ys, 10, "All 10 lines contain '$yes_str' only.\n";
5151

5252
close($child); # apparently superfluous
53-
} else {
53+
}
54+
else {
5455
die "cannot fork:$!\n" unless defined $pid;
5556
# CHILD PROCESS
5657
exit; # apparently superfluous
58+
}
5759
}
58-
}
5960

6061
done_testing();

0 commit comments

Comments
 (0)