diff options
author | Robin Barker <RMBarker@cpan.org> | 2001-05-04 19:13:47 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-04 17:21:12 +0000 |
commit | 0c35a64037b9819bd90f46802ea0c8b26b5bd422 (patch) | |
tree | 535770072774e85760274cc22192b75515dd65e5 | |
parent | 392fbf5d105b6d2d0f56e66367fa2ffc7ec09143 (diff) | |
download | perl-0c35a64037b9819bd90f46802ea0c8b26b5bd422.tar.gz |
[PATHC perl@9944] missing library tests: Pod::Plainer
Message-Id: <200105041713.SAA14842@tempest.npl.co.uk>
p4raw-id: //depot/perl@9992
-rw-r--r-- | MANIFEST | 1 | ||||
-rw-r--r-- | t/pod/plainer.t | 52 |
2 files changed, 53 insertions, 0 deletions
@@ -1784,6 +1784,7 @@ t/pod/nested_seqs.t Test nested interior sequences t/pod/nested_seqs.xr Expected results for nested_seqs.t t/pod/oneline_cmds.t Test single paragraph ==cmds t/pod/oneline_cmds.xr Expected results for oneline_cmds.t +t/pod/plainer.t Test Pod::Plainer t/pod/pod2usage.t Test Pod::Usage t/pod/pod2usage.xr Expected results for pod2usage.t t/pod/poderrs.t Test POD errors diff --git a/t/pod/plainer.t b/t/pod/plainer.t new file mode 100644 index 0000000000..7737ebbab1 --- /dev/null +++ b/t/pod/plainer.t @@ -0,0 +1,52 @@ +#!./perl + +BEGIN { chdir 't' if -d 't'; @INC = '../lib' } + +use Pod::Plainer; +my $parser = Pod::Plainer->new(); +my $header = "=pod\n\n"; +my $input = 'plnr_in.pod'; +my $output = 'plnr_out.pod'; + +my $test = 0; +print "1..7\n"; +while( <DATA> ) { + my $expected = $header.<DATA>; + + open(IN, '>', $input) or die $!; + print IN $header, $_; + close IN or die $!; + + open IN, '<', $input or die $!; + open OUT, '>', $output or die $!; + $parser->parse_from_filehandle(\*IN,\*OUT); + + open OUT, '<', $output or die $!; + my $returned; { local $/; $returned = <OUT>; } + + unless( $returned eq $expected ) { + print map { s/^/\#/mg; $_; } + map {+$_} # to avoid readonly values + "EXPECTED:\n", $expected, "GOT:\n", $returned; + print "not "; + } + printf "ok %d\n", ++$test; +} + +END { unlink $input, $output } + +__END__ +=head <> now reads in records +=head E<lt>E<gt> now reads in records +=item C<-T> and C<-B> not implemented on filehandles +=item C<-T> and C<-B> not implemented on filehandles +e.g. C<< Foo->bar() >> or C<< $obj->bar() >> +e.g. C<Foo-E<gt>bar()> or C<$obj-E<gt>bar()> +The C<< => >> operator is mostly just a more visually distinctive +The C<=E<gt>> operator is mostly just a more visually distinctive +C<uv < 0x80> in which case you can use C<*s = uv>. +C<uv E<lt> 0x80> in which case you can use C<*s = uv>. +C<time ^ ($$ + ($$ << 15))>), but that isn't necessary any more. +C<time ^ ($$ + ($$ E<lt>E<lt> 15))>), but that isn't necessary any more. +The bitwise operation C<<< >> >>> +The bitwise operation C<E<gt>E<gt>> |