summaryrefslogtreecommitdiff
path: root/lib/Pod/t/man-options.t
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Pod/t/man-options.t')
-rw-r--r--lib/Pod/t/man-options.t62
1 files changed, 4 insertions, 58 deletions
diff --git a/lib/Pod/t/man-options.t b/lib/Pod/t/man-options.t
index 0d86cb896c..04895d539c 100644
--- a/lib/Pod/t/man-options.t
+++ b/lib/Pod/t/man-options.t
@@ -16,7 +16,7 @@ BEGIN {
}
unshift (@INC, '../blib/lib');
$| = 1;
- print "1..16\n";
+ print "1..7\n";
}
END {
@@ -42,7 +42,6 @@ $loaded = 1;
print "ok 1\n";
my $n = 2;
-eval { binmode (\*DATA, ':encoding(utf-8)') };
while (<DATA>) {
my %options;
next until $_ eq "###\n";
@@ -52,8 +51,6 @@ while (<DATA>) {
$options{$option} = $value;
}
open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n";
- eval { binmode (\*TMP, ':encoding(utf-8)') };
- print TMP "=encoding utf-8\n\n";
while (<DATA>) {
last if $_ eq "###\n";
print TMP $_;
@@ -61,16 +58,13 @@ while (<DATA>) {
close TMP;
my $parser = Pod::Man->new (%options) or die "Cannot create parser\n";
open (OUT, '> out.tmp') or die "Cannot create out.tmp: $!\n";
- eval { binmode (\*OUT, ':encoding(utf-8)') };
stderr_save;
$parser->parse_from_file ('tmp.pod', \*OUT);
stderr_restore;
close OUT;
my $accents = 0;
open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n";
- eval { binmode (\*TMP, ':encoding(utf-8)') };
while (<TMP>) {
- $accents = 1 if /Accent mark definitions/;
last if /^\.nh/;
}
my $output;
@@ -80,14 +74,6 @@ while (<DATA>) {
}
close TMP;
unlink ('tmp.pod', 'out.tmp');
- if (($options{utf8} && !$accents) || (!$options{utf8} && $accents)) {
- print "ok $n\n";
- } else {
- print "not ok $n\n";
- print ($accents ? "Saw accents\n" : "Saw no accents\n");
- print ($options{utf8} ? "Wanted no accents\n" : "Wanted accents\n");
- }
- $n++;
my $expected = '';
while (<DATA>) {
last if $_ eq "###\n";
@@ -129,46 +115,6 @@ while (<DATA>) {
__DATA__
###
-utf8 1
-###
-=head1 BEYONCÉ
-
-Beyoncé! Beyoncé! Beyoncé!!
-
- Beyoncé! Beyoncé!
- Beyoncé! Beyoncé!
- Beyoncé! Beyoncé!
-
-Older versions did not convert Beyoncé in verbatim.
-###
-.SH "BEYONCÉ"
-.IX Header "BEYONCÉ"
-Beyoncé! Beyoncé! Beyoncé!!
-.PP
-.Vb 3
-\& Beyoncé! Beyoncé!
-\& Beyoncé! Beyoncé!
-\& Beyoncé! Beyoncé!
-.Ve
-.PP
-Older versions did not convert Beyoncé in verbatim.
-###
-###
-
-###
-utf8 1
-###
-=head1 SE<lt>E<gt> output with UTF-8
-
-This is S<non-breaking output>.
-###
-.SH "S<> output with UTF\-8"
-.IX Header "S<> output with UTF-8"
-This is non-breaking output.
-###
-###
-
-###
fixed CR
fixedbold CY
fixeditalic CW
@@ -202,8 +148,8 @@ Bar.
.SH "POD ERRORS"
.IX Header "POD ERRORS"
Hey! \fBThe above document had some coding errors, which are explained below:\fR
-.IP "Around line 9:" 4
-.IX Item "Around line 9:"
+.IP "Around line 7:" 4
+.IX Item "Around line 7:"
You forgot a '=back' before '=head1'
###
###
@@ -225,5 +171,5 @@ Bar.
.SH "NEXT"
.IX Header "NEXT"
###
-tmp.pod around line 9: You forgot a '=back' before '=head1'
+tmp.pod around line 7: You forgot a '=back' before '=head1'
###