Lines Matching full:toc
2 # function: Test ToC insertion.
9 use HTML::Toc;
14 my $toc = HTML::Toc->new;
18 $toc->setOptions({
45 $toc->setOptions({'insertionPoint' => 'before <h1>'});
46 # Generate ToC
47 $tocGenerator->generate($toc, "<h1>Header</h1>");
48 $tocInsertor->insert($toc, "<h1>Header</h1>", {
52 # Test ToC
58 $toc->setOptions({'insertionPoint' => 'after <h1>'});
59 # Generate ToC
60 $tocGenerator->generate($toc, "<h1>Header</h1>");
61 $tocInsertor->insert($toc, "<h1>Header</h1>", {
65 # Test ToC
71 $toc->setOptions({'insertionPoint' => 'before </h1>'});
72 # Generate ToC
73 $tocGenerator->generate($toc, "<h1>Header</h1>");
74 $tocInsertor->insert($toc, "<h1>Header</h1>", {
78 # Test ToC
84 $toc->setOptions({'insertionPoint' => 'after </h1>'});
85 # Generate ToC
86 $tocGenerator->generate($toc, "<h1>Header</h1>");
87 $tocInsertor->insert($toc, "<h1>Header</h1>", {
91 # Test ToC
97 $toc->setOptions({'insertionPoint' => 'before <h1>'});
98 # Generate ToC
99 $tocGenerator->generate($toc, "<h1>Header</h1>");
100 # Insert ToC, output to file
101 $tocInsertor->insert($toc, "<h1>Header</h1>", {
109 # Test ToC
113 #--- 6. empty toc -------------------------------------------------------------
115 $tocGenerator->generate($toc, "");
116 $tocInsertor->insert($toc, "", {
128 my $toc = HTML::Toc->new();
132 # Set ToC options
133 $toc->setOptions({
134 'insertionPoint' => "after <!ToC>",
136 # Generate ToC
137 $tocInsertor->insert($toc, <<EOT, {'output' => \$output});
138 <!ToC><body>
145 # Test ToC
147 <!ToC>
148 <!-- Table of Contents generated by Perl - HTML::Toc -->
175 my $toc = HTML::Toc->new();
179 # Set ToC options
180 $toc->setOptions({
195 # Generate ToC
196 $tocInsertor->insert($toc, <<EOT, {'output' => \$output});
205 # Test ToC
208 <!-- Table of Contents generated by Perl - HTML::Toc -->
233 # function: Test replacing HTML comment with ToC.
237 my $toc = HTML::Toc->new();
241 # Set ToC options
242 $toc->setOptions({
243 'insertionPoint' => "replace <!-- ToC -->"
245 # Generate ToC
246 $tocInsertor->insert($toc, <<EOT, {'output' => \$output});
247 <!-- ToC -->
255 # Test ToC
258 <!-- Table of Contents generated by Perl - HTML::Toc -->
282 # function: Test replacing HTML comment with ToC.
286 my $toc = HTML::Toc->new();
290 # Set ToC options
291 $toc->setOptions({
292 'insertionPoint' => "replace ToC will be placed here[,]"
294 # Generate ToC
295 $tocInsertor->insert($toc, <<EOT, {'output' => \$output});
296 The ToC will be placed here, overnight.
304 # Test ToC
307 <!-- Table of Contents generated by Perl - HTML::Toc -->