Skip to content

Commit

Permalink
Update test data
Browse files Browse the repository at this point in the history
  • Loading branch information
Altai-man committed Jul 30, 2022
1 parent 813ef63 commit c939f02
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
16 changes: 7 additions & 9 deletions t/050-format-x-index.t
Expand Up @@ -3,24 +3,24 @@ use Pod::To::HTML;
plan 3;

=begin pod
X<|behavior> L<http://www.doesnt.get.rendered.com>
X<|category,behavior> L<http://www.doesnt.get.rendered.com>
=end pod

my $r = pod2html $=pod, :url({ $_ });
ok $r ~~ m/'href="http://www.doesnt.get.rendered.com"'/;

=begin pod
When indexing X<an item> the X<X format> is used.
When indexing X<an item|category,an item> the X<X format|category,X format> is used.
It is possible to index X<an item> in repeated places.
It is possible to index X<an item|category,an item> in repeated places.
=end pod

$r = node2html $=pod[1];

like $r, /
'When indexing'
\s* '<a name="index-entry-an_item">'
\s* '<a id="index-entry-an%20item">'
\s* '<span ' .* '>an item</span>'
.+ 'the'
.+ '<span ' .+ '>X format</span>'
Expand All @@ -31,17 +31,15 @@ like $r, /

=begin pod
When indexing X<an item|Define an item> another text can be used for the index.
When indexing X<an item|category,Define an item> another text can be used for the index.
It is possible to index X<hierarchical items|defining, a term>with hierarchical levels.
And then index the X<same place|Same; Place> with different index entries.
=end pod

$r = node2html $=pod[2];
like $r, /
'When indexing <a name="index-entry-Define_an_item-an_item">'
'When indexing <a id="index-entry-Define%20an%20item">'
.* '<span' .+ '>an item</span>'
.+ 'to index ' .+ 'index-entry-defining__a_term-hierarchical_items' .+ '<span' .+ '>hierarchical items</span>'
.+ 'index the ' .+ '>same place</span>'
.+ 'to index ' .+ 'index-entry-%20a%20term' .+ '<span' .+ '>hierarchical items</span>'
/, 'Text with indexed items correct';
4 changes: 2 additions & 2 deletions t/070-headings.t
Expand Up @@ -22,7 +22,7 @@ plan 5;
=head3 Heading 2.2.1
=head3 X<Heading> 2.2.2
=head3 X<Heading|Category,Heading> 2.2.2
=head1 Heading C<3>
Expand All @@ -38,7 +38,7 @@ ok so ($0 && $1 && $2), 'hierarchical numbering';

ok so $0, 'link down to heading';

($html ~~ m:g/ ('name="index-entry-Heading"') /);
($html ~~ m:g/ ('id="index-entry-Heading"') /);

ok so ($0 || $1), 'no X<> anchors in ToC';

Expand Down

0 comments on commit c939f02

Please sign in to comment.