summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/cpan/podlators/t/basic.t
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/perl/cpan/podlators/t/basic.t')
-rwxr-xr-xgnu/usr.bin/perl/cpan/podlators/t/basic.t25
1 files changed, 13 insertions, 12 deletions
diff --git a/gnu/usr.bin/perl/cpan/podlators/t/basic.t b/gnu/usr.bin/perl/cpan/podlators/t/basic.t
index eb94ef22a36..4103ed6e19b 100755
--- a/gnu/usr.bin/perl/cpan/podlators/t/basic.t
+++ b/gnu/usr.bin/perl/cpan/podlators/t/basic.t
@@ -2,7 +2,8 @@
#
# basic.t -- Basic tests for podlators.
#
-# Copyright 2001, 2002, 2004, 2006, 2009 by Russ Allbery <rra@stanford.edu>
+# Copyright 2001, 2002, 2004, 2006, 2009, 2012
+# Russ Allbery <rra@stanford.edu>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
@@ -70,22 +71,22 @@ for my $module (sort keys %translators) {
# For Pod::Man, strip out the autogenerated header up to the .TH title
# line. That means that we don't check those things; oh well. The
# header changes with each version change or touch of the input file.
- open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
+ open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
$parser->parse_from_file (source_path ('basic.pod'), \*OUT);
close OUT;
if ($module eq 'Pod::Man') {
- open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
- open (OUTPUT, "> out.$translators{$module}")
- or die "Cannot create out.$translators{$module}: $!\n";
+ open (TMP, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
+ open (OUTPUT, "> out$$.$translators{$module}")
+ or die "Cannot create out$$.$translators{$module}: $!\n";
local $_;
while (<TMP>) { last if /^\.nh/ }
print OUTPUT while <TMP>;
close OUTPUT;
close TMP;
- 1 while unlink 'out.tmp';
+ 1 while unlink "out$$.tmp";
} else {
- rename ('out.tmp', "out.$translators{$module}")
- or die "Cannot rename out.tmp: $!\n";
+ rename ("out$$.tmp", "out$$.$translators{$module}")
+ or die "Cannot rename out$$.tmp: $!\n";
}
# Slurp the output and expected output and compare them.
@@ -94,8 +95,8 @@ for my $module (sort keys %translators) {
local $/;
open (MASTER, source_path ("basic.$translators{$module}"))
or die "Cannot open basic.$translators{$module}: $!\n";
- open (OUTPUT, "out.$translators{$module}")
- or die "Cannot open out.$translators{$module}: $!\n";
+ open (OUTPUT, "out$$.$translators{$module}")
+ or die "Cannot open out$$.$translators{$module}: $!\n";
$master = <MASTER>;
$output = <OUTPUT>;
close MASTER;
@@ -108,9 +109,9 @@ for my $module (sort keys %translators) {
$output =~ tr/\033/\047/;
}
if (ok ($master eq $output, "$module output is correct")) {
- 1 while unlink "out.$translators{$module}";
+ 1 while unlink "out$$.$translators{$module}";
} else {
- diag ("Non-matching output left in out.$translators{$module}\n");
+ diag ("Non-matching output left in out$$.$translators{$module}\n");
}
}
}