summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/cpan/podlators/t/pod-parser.t
diff options
context:
space:
mode:
authorafresh1 <afresh1@openbsd.org>2014-03-24 14:58:42 +0000
committerafresh1 <afresh1@openbsd.org>2014-03-24 14:58:42 +0000
commit91f110e064cd7c194e59e019b83bb7496c1c84d4 (patch)
tree3e8e577405dba7e94b43cbf21c22f21aaa5ab949 /gnu/usr.bin/perl/cpan/podlators/t/pod-parser.t
parentdo not call purge_task every 10 secs, it is only needed once at startup and (diff)
downloadwireguard-openbsd-91f110e064cd7c194e59e019b83bb7496c1c84d4.tar.xz
wireguard-openbsd-91f110e064cd7c194e59e019b83bb7496c1c84d4.zip
Import perl-5.18.2
OK espie@ sthen@ deraadt@
Diffstat (limited to 'gnu/usr.bin/perl/cpan/podlators/t/pod-parser.t')
-rwxr-xr-xgnu/usr.bin/perl/cpan/podlators/t/pod-parser.t26
1 files changed, 13 insertions, 13 deletions
diff --git a/gnu/usr.bin/perl/cpan/podlators/t/pod-parser.t b/gnu/usr.bin/perl/cpan/podlators/t/pod-parser.t
index ae2ef016761..6394731e140 100755
--- a/gnu/usr.bin/perl/cpan/podlators/t/pod-parser.t
+++ b/gnu/usr.bin/perl/cpan/podlators/t/pod-parser.t
@@ -2,7 +2,7 @@
#
# pod-parser.t -- Tests for backward compatibility with Pod::Parser.
#
-# Copyright 2006, 2008, 2009 by Russ Allbery <rra@stanford.edu>
+# Copyright 2006, 2008, 2009, 2012 by 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.
@@ -26,13 +26,13 @@ BEGIN {
my $parser = Pod::Man->new;
isa_ok ($parser, 'Pod::Man', 'Pod::Man parser object');
-open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
+open (TMP, "> tmp$$.pod") or die "Cannot create tmp$$.pod: $!\n";
print TMP "Some random B<text>.\n";
close TMP;
-open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
-$parser->parse_from_file ({ -cutting => 0 }, 'tmp.pod', \*OUT);
+open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
+$parser->parse_from_file ({ -cutting => 0 }, "tmp$$.pod", \*OUT);
close OUT;
-open (OUT, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+open (OUT, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
while (<OUT>) { last if /^\.nh/ }
my $output;
{
@@ -44,10 +44,10 @@ is ($output, "Some random \\fBtext\\fR.\n", 'Pod::Man -cutting output');
$parser = Pod::Text->new;
isa_ok ($parser, 'Pod::Text', 'Pod::Text parser object');
-open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
-$parser->parse_from_file ({ -cutting => 0 }, 'tmp.pod', \*OUT);
+open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
+$parser->parse_from_file ({ -cutting => 0 }, "tmp$$.pod", \*OUT);
close OUT;
-open (OUT, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+open (OUT, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
{
local $/;
$output = <OUT>;
@@ -56,17 +56,17 @@ close OUT;
is ($output, " Some random text.\n\n", 'Pod::Text -cutting output');
# Test the pod2text function, particularly with only one argument.
-open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
+open (TMP, "> tmp$$.pod") or die "Cannot create tmp$$.pod: $!\n";
print TMP "=pod\n\nSome random B<text>.\n";
close TMP;
-open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
+open (OUT, "> out$$.tmp") or die "Cannot create out$$.tmp: $!\n";
open (SAVE, '>&STDOUT') or die "Cannot dup stdout: $!\n";
open (STDOUT, '>&OUT') or die "Cannot replace stdout: $!\n";
-pod2text ('tmp.pod');
+pod2text ("tmp$$.pod");
close OUT;
open (STDOUT, '>&SAVE') or die "Cannot fix stdout: $!\n";
close SAVE;
-open (OUT, 'out.tmp') or die "Cannot open out.tmp: $!\n";
+open (OUT, "out$$.tmp") or die "Cannot open out$$.tmp: $!\n";
{
local $/;
$output = <OUT>;
@@ -74,5 +74,5 @@ open (OUT, 'out.tmp') or die "Cannot open out.tmp: $!\n";
close OUT;
is ($output, " Some random text.\n\n", 'Pod::Text pod2text function');
-1 while unlink ('tmp.pod', 'out.tmp');
+1 while unlink ("tmp$$.pod", "out$$.tmp");
exit 0;