#--- format.t ----------------------------------------------------------------- # function: Test ToC formatting. use strict; use Test; BEGIN { plan tests => 6; } use HTML::Toc; use HTML::TocGenerator; use HTML::TocInsertor; my ($output, $content, $filename); my $toc = HTML::Toc->new; my $tocGenerator = HTML::TocGenerator->new; my $tocInsertor = HTML::TocInsertor->new; $toc->setOptions({ 'doLinkToToken' => 0, 'levelIndent' => 0, 'insertionPoint' => 'before

', 'header' => '', 'footer' => '', }); BEGIN { # Create test file $filename = "file$$.htm"; die "$filename is already there" if -e $filename; open(FILE, ">$filename") || die "Can't create $filename: $!"; print FILE <<'EOT'; close(FILE);

Header

EOT } END { # Remove test file unlink($filename) or warn "Can't unlink $filename: $!"; } #--- 1. templateLevelBegin ---------------------------------------------------- $toc->setOptions({ 'templateLevelBegin' => '"