diff options
Diffstat (limited to 'gnu/usr.bin/perl/cpan/podlators/t/pod-parser.t')
-rwxr-xr-x | gnu/usr.bin/perl/cpan/podlators/t/pod-parser.t | 26 |
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; |