diff options
author | Steve Peters <steve@fisharerojo.org> | 2006-10-27 13:29:05 +0000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2006-10-27 13:29:05 +0000 |
commit | 267d554123ae974ccd717e77510a6c3e0691dab2 (patch) | |
tree | 8c9a9d262ce2df1205335ca4083ae5cda3f370c6 /t | |
parent | 6d9eb87b84e83dcddb478c183e4d030b860db098 (diff) | |
download | perl-267d554123ae974ccd717e77510a6c3e0691dab2.tar.gz |
Upgrade to Pod-Parser-1.35.
p4raw-id: //depot/perl@29126
Diffstat (limited to 't')
-rw-r--r-- | t/pod/p2u_data.pl | 18 | ||||
-rw-r--r-- | t/pod/testcmp.pl | 3 | ||||
-rw-r--r-- | t/pod/twice.t | 36 |
3 files changed, 57 insertions, 0 deletions
diff --git a/t/pod/p2u_data.pl b/t/pod/p2u_data.pl new file mode 100644 index 0000000000..ec0e3a7e50 --- /dev/null +++ b/t/pod/p2u_data.pl @@ -0,0 +1,18 @@ +use Pod::Usage; +pod2usage(-verbose => 2, -exit => 17, -input => \*DATA); + +__DATA__ +=head1 NAME + +Test + +=head1 SYNOPSIS + +perl podusagetest.pl + +=head1 DESCRIPTION + +This is a test. + +=cut + diff --git a/t/pod/testcmp.pl b/t/pod/testcmp.pl index 5f6217192c..17f0b0b4c2 100644 --- a/t/pod/testcmp.pl +++ b/t/pod/testcmp.pl @@ -65,6 +65,9 @@ sub testcmp( $ $ ; $) { defined($f2text = <$fh2>) and chomp($f2text); ++$line; last unless ( defined($f1text) and defined($f2text) ); + # kill any extra line endings + $f1text =~ s/[\r\n]+$//s; + $f2text =~ s/[\r\n]+$//s; $diffs = (ref $cmplines) ? &$cmplines($f1text, $f2text) : ($f1text ne $f2text); last if $diffs; diff --git a/t/pod/twice.t b/t/pod/twice.t new file mode 100644 index 0000000000..098bc3c628 --- /dev/null +++ b/t/pod/twice.t @@ -0,0 +1,36 @@ +use strict; +use Test; +use File::Spec; + +BEGIN { plan tests => 1 } + +use Pod::Parser; +use Carp; +$SIG{__DIE__} = \&Carp::confess; + +eval {require IO::String;}; +skip($@ ? 'no IO::String' : '', sub { + { + my $pod_string = 'some I<silly> text'; + my $handle = IO::String->new( \$pod_string ); + my $parser = Pod::Parser->new(); + $parser->parse_from_file( $0, $handle ); + } + # free the reference + { + my $parser = Pod::Parser->new(); + $parser->parse_from_file( $0, File::Spec->devnull ); + } + 1; +}); + +exit 0; + +__END__ + +=head1 EXAMPLE + +This test makes sure the parse_from_file is re-entrant + +=cut + |