diff options
Diffstat (limited to 'cpan/Pod-Simple/t/pulltitl.t')
-rw-r--r-- | cpan/Pod-Simple/t/pulltitl.t | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/cpan/Pod-Simple/t/pulltitl.t b/cpan/Pod-Simple/t/pulltitl.t index abaf83f7b7..c50c9327b0 100644 --- a/cpan/Pod-Simple/t/pulltitl.t +++ b/cpan/Pod-Simple/t/pulltitl.t @@ -7,7 +7,7 @@ BEGIN { use strict; use Test; -BEGIN { plan tests => 104 }; +BEGIN { plan tests => 114 }; #use Pod::Simple::Debug (5); @@ -29,6 +29,7 @@ my $p = Pod::Simple::PullParser->new; $p->set_source( \qq{\n=head1 NAME\n\nBzorch\n\n=pod\n\nLala\n\n\=cut\n} ); ok $p->get_title(), 'Bzorch'; + my $t; ok( $t = $p->get_token); @@ -48,6 +49,29 @@ ok( $t && $t->type eq 'text' && $t->text, 'NAME' ); ########################################################################### { +print "# Testing a set with nocase, at line ", __LINE__, "\n"; +my $p = Pod::Simple::PullParser->new; +$p->set_source( \qq{\n=head1 Name\n\nShazbot\n\n=pod\n\nLala\n\n\=cut\n} ); + +ok $p->get_title(nocase => 1), 'Shazbot'; + +ok( my $t = $p->get_token); +ok( $t && $t->type, 'start'); +ok( $t && $t->type eq 'start' && $t->tagname, 'Document' ); + +ok( $t = $p->get_token); +ok( $t && $t->type, 'start'); +ok( $t && $t->type eq 'start' && $t->tagname, 'head1' ); + +ok( $t = $p->get_token); +ok( $t && $t->type, 'text'); +ok( $t && $t->type eq 'text' && $t->text, 'Name' ); + +} + +########################################################################### + +{ print "# Testing another set, at line ", __LINE__, "\n"; my $p = Pod::Simple::PullParser->new; |