diff options
author | Russ Allbery <rra@cpan.org> | 2020-01-17 22:04:01 -0800 |
---|---|---|
committer | Russ Allbery <rra@cpan.org> | 2020-01-17 22:04:01 -0800 |
commit | 93bf5456e6e7d9eb9db4132caa011d3b82d241d3 (patch) | |
tree | b92190ef441f52bec7207f559a095fcfa20a35a8 | |
parent | e2445f5ec43000f9bca63474d2b43ed241430e25 (diff) |
Adjust formatting for new Perl::Tidy
-rwxr-xr-x | t/dist/basic.t | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/t/dist/basic.t b/t/dist/basic.t index 7d11c9d..72c394c 100755 --- a/t/dist/basic.t +++ b/t/dist/basic.t @@ -85,7 +85,9 @@ chmod(0000, File::Spec->catfile($distdir, 'Empty', 'Build.PL')); # Setup finished. Now we can create a distribution tarball. chdir($sourcedir); my $dist = App::DocKnot::Dist->new({ distdir => $distdir, perl => $^X }); -capture_stdout { eval { $dist->make_distribution() } }; +capture_stdout { + eval { $dist->make_distribution() }; +}; ok(-f File::Spec->catfile($distdir, 'Empty-1.00.tar.gz'), 'dist exists'); ok(-f File::Spec->catfile($distdir, 'Empty-1.00.tar.xz'), 'xz dist exists'); ok(!-f File::Spec->catfile($distdir, 'Empty-1.00.tar'), 'tarball missing'); @@ -96,7 +98,9 @@ is($@, q{}, 'no errors'); open($fh, '>', 'ignored-file'); print {$fh} "Some data\n" or die "cannot write to some-file: $!\n"; close($fh); -capture_stdout { eval { $dist->make_distribution() } }; +capture_stdout { + eval { $dist->make_distribution() }; +}; is($@, q{}, 'no errors with ignored file'); # If we add a new file to the source tree and run make_distribution() again, @@ -105,7 +109,9 @@ is($@, q{}, 'no errors with ignored file'); open($fh, '>', 'some-file'); print {$fh} "Some data\n" or die "cannot write to some-file: $!\n"; close($fh); -my $stdout = capture_stdout { eval { $dist->make_distribution() } }; +my $stdout = capture_stdout { + eval { $dist->make_distribution() }; +}; is($@, "1 file missing from distribution\n", 'correct error for extra file'); like($stdout, qr{ some-file }xms, 'output mentions the right file'); @@ -118,7 +124,9 @@ is_deeply(['some-file'], \@missing, 'check_dist matches'); open($fh, '>', 'another-file'); print {$fh} "Some data\n" or die "cannot write to some-file: $!\n"; close($fh); -$stdout = capture_stdout { eval { $dist->make_distribution() } }; +$stdout = capture_stdout { + eval { $dist->make_distribution() }; +}; is($@, "2 files missing from distribution\n", 'correct error for two files'); like($stdout, qr{ some-file }xms, 'output mentions the first file'); like($stdout, qr{ another-file }xms, 'output mentions the other file'); |