diff options
author | Vignesh Venkatasubramanian <vigneshv@google.com> | 2014-03-27 00:50:12 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-03-27 00:50:12 +0000 |
commit | 7616a7e29066d65ecd1d6f54485360d3964c67bb (patch) | |
tree | c051eed430b02e9a3b5275d65969e25b024e2733 /libvpx/examples/includes/HTML-Toc-0.91/t/siteMap.t | |
parent | b2e48fbeea3ad651e5e1d00770cb3609c60bb3e7 (diff) | |
parent | 2ec72e65689c948e92b826ae1e867bf369e72f13 (diff) | |
download | android_external_libvpx-7616a7e29066d65ecd1d6f54485360d3964c67bb.tar.gz android_external_libvpx-7616a7e29066d65ecd1d6f54485360d3964c67bb.tar.bz2 android_external_libvpx-7616a7e29066d65ecd1d6f54485360d3964c67bb.zip |
am 2ec72e65: libvpx: Roll latest libvpx
* commit '2ec72e65689c948e92b826ae1e867bf369e72f13':
libvpx: Roll latest libvpx
Diffstat (limited to 'libvpx/examples/includes/HTML-Toc-0.91/t/siteMap.t')
-rw-r--r-- | libvpx/examples/includes/HTML-Toc-0.91/t/siteMap.t | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/libvpx/examples/includes/HTML-Toc-0.91/t/siteMap.t b/libvpx/examples/includes/HTML-Toc-0.91/t/siteMap.t deleted file mode 100644 index 074f0bd..0000000 --- a/libvpx/examples/includes/HTML-Toc-0.91/t/siteMap.t +++ /dev/null @@ -1,97 +0,0 @@ -#--- manual.t ----------------------------------------------------------------- -# function: Test HTML::ToC generating a manual. - -use strict; -use Test; - -BEGIN { plan tests => 1; } - -use Data::Dumper; -use File::Find; -use HTML::Toc; -use HTML::TocGenerator; -use HTML::TocInsertor; -use HTML::TocUpdator; - - - # Create objects -my $toc = HTML::Toc->new(); -my $tocGenerator = HTML::TocGenerator->new(); -my @fileList; - - -#--- TestSiteMap() ------------------------------------------------------------ -# function: Test specifying numbered list. - -sub TestSiteMap { - # Set ToC options - $toc->setOptions({ - 'doLinkToFile' => 1, - 'templateAnchorName' => '""', - 'templateAnchorHref' => '"<a href=$file"."#".$groupId.$level.">"', - 'doLinkTocToToken' => 1, - 'tokenToToc' => [{ - 'groupId' => 'dir', - 'level' => 1, - 'tokenBegin' => '<title>', - 'tokenEnd' => '</title>', - 'fileSpec' => '\./[^/]+$' - }, { - 'groupId' => 'dir', - 'level' => 2, - 'tokenBegin' => '<title>', - 'tokenEnd' => '</title>', - 'fileSpec' => '\./[^/]+?/[^/]+$' - }, { - 'groupId' => 'dir', - 'level' => 3, - 'tokenBegin' => '<title>', - 'tokenEnd' => '</title>', - 'fileSpec' => '\./[^/]+?/[^/]+?/[^/]+$' - }] - }); - # Change current directory - chdir("t/SiteMap"); - # Find files, filling 'fileList' - find({wanted => \&WantedSiteMap, no_chdir => 1}, '.'); - # Generate ToC of case-insensitively sorted file list - $tocGenerator->extendFromFile( - $toc, [sort {uc($a) cmp uc($b)} @fileList] - ); - # Restore current directory - chdir("../.."); - # Test ToC - ok($toc->format(), <<EOT); - -<!-- Table of Contents generated by Perl - HTML::Toc --> -<ul> - <li><a href=./index.htm#>Main</a> - <ul> - <li><a href=./SubDir1/index.htm#>Sub1</a> - <ul> - <li><a href=./SubDir1/SubSubDir1/index.htm#>SubSub1</a> - </ul> - <li><a href=./SubDir2/index.htm#>Sub2</a> - <ul> - <li><a href=./SubDir2/SubSubDir1/index.htm#>SubSub1</a> - <li><a href=./SubDir2/SubSubDir2/index.htm#>SubSub2</a> - </ul> - <li><a href=./SubDir3/index.htm#>Sub3</a> - </ul> -</ul> -<!-- End of generated Table of Contents --> -EOT -} # TestSiteMap() - - -#--- WantedSiteMap() ---------------------------------------------------------- -# function: 'Wanted' function, used by File::Find of 'TestSiteMap()'. - -sub WantedSiteMap { - # Add file to 'fileList' if extension matches '.htm' - push (@fileList, $File::Find::name) if (m/\.htm$/); -} # WantedSiteMap() - - - # Test site map -TestSiteMap(); |