Commits

ms2ger committed 9e6800c

Flatten the now unnecessary directory structure under tests/.

  • Participants
  • Parent commits a025938

Comments (0)

Files changed (127)

 
 
 def buildTestSuite():
-    for file_name in get_files("tests", "*", "*.src.html"):
+    for file_name in get_files("tests", "*.src.html"):
 
         def testFunc(self, file_name=file_name):
             assert file_name.endswith(".src.html")

File tests/basic/dfn-data-anolis-xref.html

-<!DOCTYPE html><meta charset=utf-8><p><dfn data-anolis-xref=foo id=foobar>foobar</dfn></p>
-<p><a href=#foobar>foo</a></p>

File tests/basic/dfn-data-anolis-xref.src.html

-<!doctype html>
-<p><dfn data-anolis-xref="foo">foobar</dfn></p>
-<p><span>foo</span></p>

File tests/basic/dfn-in-header.html

-<!DOCTYPE html><meta charset=utf-8><h1 id=the-foobar-magic>The <dfn>foobar</dfn> magic</h1>
-<p><a href=#the-foobar-magic>foobar</a></p>

File tests/basic/dfn-in-header.src.html

-<!doctype html>
-<h1>The <dfn>foobar</dfn> magic</h1>
-<p><span>foobar</span></p>

File tests/basic/dfn_data-anolis-xref_multiple.html

-<!DOCTYPE html><meta charset=utf-8><p><dfn data-anolis-xref=foo|bar id=foobar>foobar</dfn></p>
-<p><a href=#foobar>foo</a></p>
-<p><a href=#foobar>foo</a></p>

File tests/basic/dfn_data-anolis-xref_multiple.src.html

-<!doctype html>
-<p><dfn data-anolis-xref="foo|bar">foobar</dfn></p>
-<p><span>foo</span></p>
-<p><span>foo</span></p>

File tests/basic/dfn_nested_content.html

-<!DOCTYPE html><meta charset=utf-8><p><dfn id=foobar><span>foobar</span></dfn></p>
-<p><a href=#foobar>foobar</a></p>

File tests/basic/dfn_nested_content.src.html

-<!doctype html>
-<p><dfn><span>foobar</span></dfn></p>
-<p><span>foobar</span></p>

File tests/basic/dfn_predefined_id.html

-<!DOCTYPE html><meta charset=utf-8><p><dfn id=foo>foobar</dfn></p>
-<p><a href=#foo>foobar</a></p>

File tests/basic/dfn_predefined_id.src.html

-<!doctype html>
-<p><dfn id="foo">foobar</dfn></p>
-<p><span>foobar</span></p>

File tests/basic/dfn_title.html

-<!DOCTYPE html><meta charset=utf-8><p><dfn id=foo title=foo>foobar</dfn></p>
-<p><a href=#foo>foo</a></p>

File tests/basic/dfn_title.src.html

-<!doctype html>
-<p><dfn title="foo">foobar</dfn></p>
-<p><span>foo</span></p>

File tests/basic/dfn_title_multiple.html

-<!DOCTYPE html><meta charset=utf-8><p><dfn id=foo-bar title=foo|bar>foobar</dfn></p>
-<p><a href=#foo-bar>foo</a></p>
-<p><a href=#foo-bar>foo</a></p>

File tests/basic/dfn_title_multiple.src.html

-<!doctype html>
-<p><dfn title="foo|bar">foobar</dfn></p>
-<p><span>foo</span></p>
-<p><span>foo</span></p>

File tests/basic/dfn_whitespace.html

-<!DOCTYPE html><meta charset=utf-8><p><dfn id=foo-bar>foo
-bar</dfn></p>
-<p><a href=#foo-bar>foo bar</a></p>

File tests/basic/dfn_whitespace.src.html

-<!doctype html>
-<p><dfn>foo
-bar</dfn></p>
-<p><span>foo bar</span></p>

File tests/basic/html5-id-hypen.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-<h2 id=generatedID><span class=secno>1 </span>-</h2>

File tests/basic/html5-id-hypen.src.html

-<!doctype html>
-<h1>Foo</h1>
-<h2>-</h2>

File tests/basic/multi-num-pre-existing.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-<h2 id=bar><span class=secno>1 </span>Bar</h2>

File tests/basic/multi-num-pre-existing.src.html

-<!doctype html>
-<h1>Foo</h1>
-<h2><span class="secno">0 </span><span class="secno">1 </span>Bar</h2>

File tests/basic/num-pre-existing.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-<h2 id=bar><span class=secno>1 </span>Bar</h2>

File tests/basic/num-pre-existing.src.html

-<!doctype html>
-<h1>Foo</h1>
-<h2><span class="secno">0 </span>Bar</h2>

File tests/basic/num-within-em.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-<h2 id=bar><span class=secno>1 </span><em>Bar</em></h2>

File tests/basic/num-within-em.src.html

-<!doctype html>
-<h1>Foo</h1>
-<h2><em><span class="secno">0 </span>Bar</em></h2>

File tests/basic/toc-basic.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-
-<!--begin-toc-->
-<ol class=toc>
- <li><a href=#bar><span class=secno>1 </span>Bar</a></li>
- <li><a href=#baz><span class=secno>2 </span>Baz?</a></ol>
-<!--end-toc-->
-<h2 id=bar><span class=secno>1 </span>Bar</h2>
-<h2 id=baz><span class=secno>2 </span>Baz?</h2>

File tests/basic/toc-basic.src.html

-<!doctype html>
-<h1>Foo</h1>
-<!--toc-->
-<h2>Bar</h2>
-<h2>Baz?</h2>

File tests/basic/toc-begin-end-content-garbage.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-<!--begin-toc-->
-<ol class=toc>
- <li><a href=#bar><span class=secno>1 </span>Bar</a></ol><!--end-toc-->
-<h2 id=bar><span class=secno>1 </span>Bar</h2>

File tests/basic/toc-begin-end-content-garbage.src.html

-<!doctype html>
-<h1>Foo</h1>
-<!--begin-toc-->This is certainly pointless to have here, seeming it'll be eaten by the <kbd>spec-gen</kbd>, and so will this<!--end-toc-->
-<h2>Bar</h2>

File tests/basic/toc-begin-end-content.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-<!--begin-toc-->
-<ol class=toc>
- <li><a href=#bar><span class=secno>1 </span>Bar</a></ol><!--end-toc-->
-<h2 id=bar><span class=secno>1 </span>Bar</h2>

File tests/basic/toc-begin-end-content.src.html

-<!doctype html>
-<h1>Foo</h1>
-<!--begin-toc--><ol class=toc><li><a href=#bar><span>1. </span>Bar</a></ol><!--end-toc-->
-<h2>Bar</h2>

File tests/basic/toc-begin-end.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-<!--begin-toc-->
-<ol class=toc>
- <li><a href=#bar><span class=secno>1 </span>Bar</a></ol><!--end-toc-->
-<h2 id=bar><span class=secno>1 </span>Bar</h2>

File tests/basic/toc-begin-end.src.html

-<!doctype html>
-<h1>Foo</h1>
-<!--begin-toc--><!--end-toc-->
-<h2>Bar</h2>

File tests/basic/toc-code.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-
-<!--begin-toc-->
-<ol class=toc>
- <li><a href=#bar><span class=secno>1 </span><code>Bar</code></a></ol>
-<!--end-toc-->
-<h2 id=bar><span class=secno>1 </span><code>Bar</code></h2>

File tests/basic/toc-code.src.html

-<!doctype html>
-<h1>Foo</h1>
-<!--toc-->
-<h2><code>Bar</code></h2>

File tests/basic/toc-dfn-code.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-
-<!--begin-toc-->
-<ol class=toc>
- <li><a href=#bar><span class=secno>1 </span><code>Bar</code></a></ol>
-<!--end-toc-->
-<h2 id=bar><span class=secno>1 </span><dfn><code>Bar</code></dfn></h2>

File tests/basic/toc-dfn-code.src.html

-<!doctype html>
-<h1>Foo</h1>
-<!--toc-->
-<h2><dfn><code>Bar</code></dfn></h2>

File tests/basic/toc-dfn-within-em.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-
-<!--begin-toc-->
-<ol class=toc>
- <li><a href=#bar><span class=secno>1 </span><em>Bar</em></a></ol>
-<!--end-toc-->
-<h2 id=bar><span class=secno>1 </span><em><dfn>Bar</dfn></em></h2>

File tests/basic/toc-dfn-within-em.src.html

-<!doctype html>
-<h1>Foo</h1>
-<!--toc-->
-<h2><em><dfn>Bar</dfn></em></h2>

File tests/basic/toc-dfn.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-
-<!--begin-toc-->
-<ol class=toc>
- <li><a href=#bar><span class=secno>1 </span>Bar</a></ol>
-<!--end-toc-->
-<h2 id=bar><span class=secno>1 </span><dfn>Bar</dfn></h2>

File tests/basic/toc-dfn.src.html

-<!doctype html>
-<h1>Foo</h1>
-<!--toc-->
-<h2><dfn>Bar</dfn></h2>

File tests/basic/toc-header-element-descendant-h1.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-
-<!--begin-toc-->
-<ol class=toc>
- <li><a href=#bar><span class=secno>1 </span>Bar</a></ol>
-<!--end-toc-->
-<section>
-    <hgroup id=bar>
-        <div>
-            <h1><span class=secno>1 </span>Bar</h1>
-        </div>
-    </hgroup>
-</section>

File tests/basic/toc-header-element-descendant-h1.src.html

-<!doctype html>
-<h1>Foo</h1>
-<!--toc-->
-<section>
-    <hgroup>
-        <div>
-            <h1>Bar</h1>
-        </div>
-    </hgroup>
-</section>

File tests/basic/toc-header-element-h2.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-
-<!--begin-toc-->
-<ol class=toc>
- <li><a href=#bar><span class=secno>1 </span>Bar</a></ol>
-<!--end-toc-->
-<section>
-    <hgroup id=bar>
-        <h2><span class=secno>1 </span>Bar</h2>
-    </hgroup>
-</section>

File tests/basic/toc-header-element-h2.src.html

-<!doctype html>
-<h1>Foo</h1>
-<!--toc-->
-<section>
-    <hgroup>
-        <h2>Bar</h2>
-    </hgroup>
-</section>

File tests/basic/toc-header-element.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-
-<!--begin-toc-->
-<ol class=toc>
- <li><a href=#bar><span class=secno>1 </span>Bar</a></ol>
-<!--end-toc-->
-<section>
-	<hgroup class="no-toc no-num" id=bar>
-		<h1><span class=secno>1 </span>Bar</h1>
-	</hgroup>
-	<hgroup id=lol>
-		<h1 class="no-toc no-num">LOL</h1>
-	</hgroup>
-</section>

File tests/basic/toc-header-element.src.html

-<!doctype html>
-<h1>Foo</h1>
-<!--toc-->
-<section>
-	<hgroup class="no-toc no-num">
-		<h1>Bar</h1>
-	</hgroup>
-	<hgroup>
-		<h1 class="no-toc no-num">LOL</h1>
-	</hgroup>
-</section>

File tests/basic/toc-multi-a.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-
-<!--begin-toc-->
-<ol class=toc>
- <li><a href=#bar-lol><span class=secno>1 </span>Bar LOL</a></ol>
-<!--end-toc-->
-<h2 id=bar-lol><span class=secno>1 </span><a href=http://example.com>Bar</a> <a href=http://example.net>LOL</a></h2>

File tests/basic/toc-multi-a.src.html

-<!doctype html>
-<h1>Foo</h1>
-<!--toc-->
-<h2><a href=http://example.com>Bar</a> <a href=http://example.net>LOL</a></h2>

File tests/basic/toc-multi-dfn-children.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-
-<!--begin-toc-->
-<ol class=toc>
- <li><a href=#text-state-and-search-state><span class=secno>1 </span>Text state and Search state</a></ol>
-<!--end-toc-->
-<h6 id=text-state-and-search-state><span class=secno>1 </span><dfn title=attr-input-type-text>Text</dfn> state and <dfn title=attr-input-type-search>Search</dfn> state</h6>

File tests/basic/toc-multi-dfn-children.src.html

-<!doctype html>
-<h1>Foo</h1>
-<!--toc-->
-<h6><dfn title="attr-input-type-text">Text</dfn> state and <dfn title="attr-input-type-search">Search</dfn> state</h6>

File tests/basic/toc-nested-dfn.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-
-<!--begin-toc-->
-<ol class=toc>
- <li><a href=#barlol><span class=secno>1 </span>BarLOL</a></ol>
-<!--end-toc-->
-<h2 id=barlol><span class=secno>1 </span><dfn><dfn>Bar</dfn>LOL</dfn></h2>

File tests/basic/toc-nested-dfn.src.html

-<!doctype html>
-<h1>Foo</h1>
-<!--toc-->
-<h2><dfn><dfn>Bar</dfn>LOL</dfn></h2>

File tests/basic/toc-remove-a.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-
-<!--begin-toc-->
-<ol class=toc>
- <li><a href=#bar><span class=secno>1 </span>Bar</a></ol>
-<!--end-toc-->
-<h2 id=bar><span class=secno>1 </span>B<a>a</a>r</h2>

File tests/basic/toc-remove-a.src.html

-<!doctype html>
-<h1>Foo</h1>
-<!--toc-->
-<h2>B<a>a</a>r</h2>

File tests/basic/toc-tail.html

-<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
-
-<!--begin-toc-->
-<ol class=toc></ol>
-<!--end-toc-->bar

File tests/basic/toc-tail.src.html

-<!doctype html>
-<h1>Foo</h1>
-<!--toc-->bar

File tests/basic/xref-nested.html

-<!DOCTYPE html><meta charset=utf-8><p><dfn id=foobar>foobar</dfn></p>
-<p><dfn id=lol>lol</dfn></p>
-<p><a href=#foobar><code>foo<span title="">bar</span></code></a></p>
-<p><a href=#lol>lol</a></p>

File tests/basic/xref-nested.src.html

-<!doctype html>
-<p><dfn>foobar</dfn></p>
-<p><dfn>lol</dfn></p>
-<p><code>foo<span title="">bar</span></code></p>
-<p><span>lol</span></p>

File tests/dfn-data-anolis-xref.html

+<!DOCTYPE html><meta charset=utf-8><p><dfn data-anolis-xref=foo id=foobar>foobar</dfn></p>
+<p><a href=#foobar>foo</a></p>

File tests/dfn-data-anolis-xref.src.html

+<!doctype html>
+<p><dfn data-anolis-xref="foo">foobar</dfn></p>
+<p><span>foo</span></p>

File tests/dfn-in-header.html

+<!DOCTYPE html><meta charset=utf-8><h1 id=the-foobar-magic>The <dfn>foobar</dfn> magic</h1>
+<p><a href=#the-foobar-magic>foobar</a></p>

File tests/dfn-in-header.src.html

+<!doctype html>
+<h1>The <dfn>foobar</dfn> magic</h1>
+<p><span>foobar</span></p>

File tests/dfn_data-anolis-xref_multiple.html

+<!DOCTYPE html><meta charset=utf-8><p><dfn data-anolis-xref=foo|bar id=foobar>foobar</dfn></p>
+<p><a href=#foobar>foo</a></p>
+<p><a href=#foobar>foo</a></p>

File tests/dfn_data-anolis-xref_multiple.src.html

+<!doctype html>
+<p><dfn data-anolis-xref="foo|bar">foobar</dfn></p>
+<p><span>foo</span></p>
+<p><span>foo</span></p>

File tests/dfn_nested_content.html

+<!DOCTYPE html><meta charset=utf-8><p><dfn id=foobar><span>foobar</span></dfn></p>
+<p><a href=#foobar>foobar</a></p>

File tests/dfn_nested_content.src.html

+<!doctype html>
+<p><dfn><span>foobar</span></dfn></p>
+<p><span>foobar</span></p>

File tests/dfn_predefined_id.html

+<!DOCTYPE html><meta charset=utf-8><p><dfn id=foo>foobar</dfn></p>
+<p><a href=#foo>foobar</a></p>

File tests/dfn_predefined_id.src.html

+<!doctype html>
+<p><dfn id="foo">foobar</dfn></p>
+<p><span>foobar</span></p>

File tests/dfn_title.html

+<!DOCTYPE html><meta charset=utf-8><p><dfn id=foo title=foo>foobar</dfn></p>
+<p><a href=#foo>foo</a></p>

File tests/dfn_title.src.html

+<!doctype html>
+<p><dfn title="foo">foobar</dfn></p>
+<p><span>foo</span></p>

File tests/dfn_title_multiple.html

+<!DOCTYPE html><meta charset=utf-8><p><dfn id=foo-bar title=foo|bar>foobar</dfn></p>
+<p><a href=#foo-bar>foo</a></p>
+<p><a href=#foo-bar>foo</a></p>

File tests/dfn_title_multiple.src.html

+<!doctype html>
+<p><dfn title="foo|bar">foobar</dfn></p>
+<p><span>foo</span></p>
+<p><span>foo</span></p>

File tests/dfn_whitespace.html

+<!DOCTYPE html><meta charset=utf-8><p><dfn id=foo-bar>foo
+bar</dfn></p>
+<p><a href=#foo-bar>foo bar</a></p>

File tests/dfn_whitespace.src.html

+<!doctype html>
+<p><dfn>foo
+bar</dfn></p>
+<p><span>foo bar</span></p>

File tests/html5-id-hypen.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+<h2 id=generatedID><span class=secno>1 </span>-</h2>

File tests/html5-id-hypen.src.html

+<!doctype html>
+<h1>Foo</h1>
+<h2>-</h2>

File tests/isbn.html

+<!DOCTYPE html><meta charset=utf-8><a href=#refsTIS620>[TIS620]</a>
+<div id=anolis-references>
+<dl><dt id=refsTIS620>[TIS620]
+<dd><cite><a href=http://www.nectec.or.th/it-standards/std620/std620.htm>UDC 681.3.04:003.62</a></cite>. Thai Industrial Standards Institute, Ministry of Industry, Royal Thai Government. ISBN 974-606-153-4.
+
+</dl></div>

File tests/isbn.options

+{
+  "processes": ["refs"]
+}

File tests/isbn.src.html

+<!doctype html>
+<span data-anolis-ref>TIS620</span>
+<div id=anolis-references>
+</div>

File tests/multi-num-pre-existing.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+<h2 id=bar><span class=secno>1 </span>Bar</h2>

File tests/multi-num-pre-existing.src.html

+<!doctype html>
+<h1>Foo</h1>
+<h2><span class="secno">0 </span><span class="secno">1 </span>Bar</h2>

File tests/num-pre-existing.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+<h2 id=bar><span class=secno>1 </span>Bar</h2>

File tests/num-pre-existing.src.html

+<!doctype html>
+<h1>Foo</h1>
+<h2><span class="secno">0 </span>Bar</h2>

File tests/num-within-em.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+<h2 id=bar><span class=secno>1 </span><em>Bar</em></h2>

File tests/num-within-em.src.html

+<!doctype html>
+<h1>Foo</h1>
+<h2><em><span class="secno">0 </span>Bar</em></h2>

File tests/refs/isbn.html

-<!DOCTYPE html><meta charset=utf-8><a href=#refsTIS620>[TIS620]</a>
-<div id=anolis-references>
-<dl><dt id=refsTIS620>[TIS620]
-<dd><cite><a href=http://www.nectec.or.th/it-standards/std620/std620.htm>UDC 681.3.04:003.62</a></cite>. Thai Industrial Standards Institute, Ministry of Industry, Royal Thai Government. ISBN 974-606-153-4.
-
-</dl></div>

File tests/refs/isbn.options

-{
-  "processes": ["refs"]
-}

File tests/refs/isbn.src.html

-<!doctype html>
-<span data-anolis-ref>TIS620</span>
-<div id=anolis-references>
-</div>

File tests/toc-basic.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+
+<!--begin-toc-->
+<ol class=toc>
+ <li><a href=#bar><span class=secno>1 </span>Bar</a></li>
+ <li><a href=#baz><span class=secno>2 </span>Baz?</a></ol>
+<!--end-toc-->
+<h2 id=bar><span class=secno>1 </span>Bar</h2>
+<h2 id=baz><span class=secno>2 </span>Baz?</h2>

File tests/toc-basic.src.html

+<!doctype html>
+<h1>Foo</h1>
+<!--toc-->
+<h2>Bar</h2>
+<h2>Baz?</h2>

File tests/toc-begin-end-content-garbage.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+<!--begin-toc-->
+<ol class=toc>
+ <li><a href=#bar><span class=secno>1 </span>Bar</a></ol><!--end-toc-->
+<h2 id=bar><span class=secno>1 </span>Bar</h2>

File tests/toc-begin-end-content-garbage.src.html

+<!doctype html>
+<h1>Foo</h1>
+<!--begin-toc-->This is certainly pointless to have here, seeming it'll be eaten by the <kbd>spec-gen</kbd>, and so will this<!--end-toc-->
+<h2>Bar</h2>

File tests/toc-begin-end-content.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+<!--begin-toc-->
+<ol class=toc>
+ <li><a href=#bar><span class=secno>1 </span>Bar</a></ol><!--end-toc-->
+<h2 id=bar><span class=secno>1 </span>Bar</h2>

File tests/toc-begin-end-content.src.html

+<!doctype html>
+<h1>Foo</h1>
+<!--begin-toc--><ol class=toc><li><a href=#bar><span>1. </span>Bar</a></ol><!--end-toc-->
+<h2>Bar</h2>

File tests/toc-begin-end.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+<!--begin-toc-->
+<ol class=toc>
+ <li><a href=#bar><span class=secno>1 </span>Bar</a></ol><!--end-toc-->
+<h2 id=bar><span class=secno>1 </span>Bar</h2>

File tests/toc-begin-end.src.html

+<!doctype html>
+<h1>Foo</h1>
+<!--begin-toc--><!--end-toc-->
+<h2>Bar</h2>

File tests/toc-code.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+
+<!--begin-toc-->
+<ol class=toc>
+ <li><a href=#bar><span class=secno>1 </span><code>Bar</code></a></ol>
+<!--end-toc-->
+<h2 id=bar><span class=secno>1 </span><code>Bar</code></h2>

File tests/toc-code.src.html

+<!doctype html>
+<h1>Foo</h1>
+<!--toc-->
+<h2><code>Bar</code></h2>

File tests/toc-dfn-code.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+
+<!--begin-toc-->
+<ol class=toc>
+ <li><a href=#bar><span class=secno>1 </span><code>Bar</code></a></ol>
+<!--end-toc-->
+<h2 id=bar><span class=secno>1 </span><dfn><code>Bar</code></dfn></h2>

File tests/toc-dfn-code.src.html

+<!doctype html>
+<h1>Foo</h1>
+<!--toc-->
+<h2><dfn><code>Bar</code></dfn></h2>

File tests/toc-dfn-within-em.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+
+<!--begin-toc-->
+<ol class=toc>
+ <li><a href=#bar><span class=secno>1 </span><em>Bar</em></a></ol>
+<!--end-toc-->
+<h2 id=bar><span class=secno>1 </span><em><dfn>Bar</dfn></em></h2>

File tests/toc-dfn-within-em.src.html

+<!doctype html>
+<h1>Foo</h1>
+<!--toc-->
+<h2><em><dfn>Bar</dfn></em></h2>

File tests/toc-dfn.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+
+<!--begin-toc-->
+<ol class=toc>
+ <li><a href=#bar><span class=secno>1 </span>Bar</a></ol>
+<!--end-toc-->
+<h2 id=bar><span class=secno>1 </span><dfn>Bar</dfn></h2>

File tests/toc-dfn.src.html

+<!doctype html>
+<h1>Foo</h1>
+<!--toc-->
+<h2><dfn>Bar</dfn></h2>

File tests/toc-header-element-descendant-h1.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+
+<!--begin-toc-->
+<ol class=toc>
+ <li><a href=#bar><span class=secno>1 </span>Bar</a></ol>
+<!--end-toc-->
+<section>
+    <hgroup id=bar>
+        <div>
+            <h1><span class=secno>1 </span>Bar</h1>
+        </div>
+    </hgroup>
+</section>

File tests/toc-header-element-descendant-h1.src.html

+<!doctype html>
+<h1>Foo</h1>
+<!--toc-->
+<section>
+    <hgroup>
+        <div>
+            <h1>Bar</h1>
+        </div>
+    </hgroup>
+</section>

File tests/toc-header-element-h2.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+
+<!--begin-toc-->
+<ol class=toc>
+ <li><a href=#bar><span class=secno>1 </span>Bar</a></ol>
+<!--end-toc-->
+<section>
+    <hgroup id=bar>
+        <h2><span class=secno>1 </span>Bar</h2>
+    </hgroup>
+</section>

File tests/toc-header-element-h2.src.html

+<!doctype html>
+<h1>Foo</h1>
+<!--toc-->
+<section>
+    <hgroup>
+        <h2>Bar</h2>
+    </hgroup>
+</section>

File tests/toc-header-element.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+
+<!--begin-toc-->
+<ol class=toc>
+ <li><a href=#bar><span class=secno>1 </span>Bar</a></ol>
+<!--end-toc-->
+<section>
+	<hgroup class="no-toc no-num" id=bar>
+		<h1><span class=secno>1 </span>Bar</h1>
+	</hgroup>
+	<hgroup id=lol>
+		<h1 class="no-toc no-num">LOL</h1>
+	</hgroup>
+</section>

File tests/toc-header-element.src.html

+<!doctype html>
+<h1>Foo</h1>
+<!--toc-->
+<section>
+	<hgroup class="no-toc no-num">
+		<h1>Bar</h1>
+	</hgroup>
+	<hgroup>
+		<h1 class="no-toc no-num">LOL</h1>
+	</hgroup>
+</section>

File tests/toc-multi-a.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+
+<!--begin-toc-->
+<ol class=toc>
+ <li><a href=#bar-lol><span class=secno>1 </span>Bar LOL</a></ol>
+<!--end-toc-->
+<h2 id=bar-lol><span class=secno>1 </span><a href=http://example.com>Bar</a> <a href=http://example.net>LOL</a></h2>

File tests/toc-multi-a.src.html

+<!doctype html>
+<h1>Foo</h1>
+<!--toc-->
+<h2><a href=http://example.com>Bar</a> <a href=http://example.net>LOL</a></h2>

File tests/toc-multi-dfn-children.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+
+<!--begin-toc-->
+<ol class=toc>
+ <li><a href=#text-state-and-search-state><span class=secno>1 </span>Text state and Search state</a></ol>
+<!--end-toc-->
+<h6 id=text-state-and-search-state><span class=secno>1 </span><dfn title=attr-input-type-text>Text</dfn> state and <dfn title=attr-input-type-search>Search</dfn> state</h6>

File tests/toc-multi-dfn-children.src.html

+<!doctype html>
+<h1>Foo</h1>
+<!--toc-->
+<h6><dfn title="attr-input-type-text">Text</dfn> state and <dfn title="attr-input-type-search">Search</dfn> state</h6>

File tests/toc-nested-dfn.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+
+<!--begin-toc-->
+<ol class=toc>
+ <li><a href=#barlol><span class=secno>1 </span>BarLOL</a></ol>
+<!--end-toc-->
+<h2 id=barlol><span class=secno>1 </span><dfn><dfn>Bar</dfn>LOL</dfn></h2>

File tests/toc-nested-dfn.src.html

+<!doctype html>
+<h1>Foo</h1>
+<!--toc-->
+<h2><dfn><dfn>Bar</dfn>LOL</dfn></h2>

File tests/toc-remove-a.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+
+<!--begin-toc-->
+<ol class=toc>
+ <li><a href=#bar><span class=secno>1 </span>Bar</a></ol>
+<!--end-toc-->
+<h2 id=bar><span class=secno>1 </span>B<a>a</a>r</h2>

File tests/toc-remove-a.src.html

+<!doctype html>
+<h1>Foo</h1>
+<!--toc-->
+<h2>B<a>a</a>r</h2>

File tests/toc-tail.html

+<!DOCTYPE html><meta charset=utf-8><h1>Foo</h1>
+
+<!--begin-toc-->
+<ol class=toc></ol>
+<!--end-toc-->bar

File tests/toc-tail.src.html

+<!doctype html>
+<h1>Foo</h1>
+<!--toc-->bar

File tests/xref-nested.html

+<!DOCTYPE html><meta charset=utf-8><p><dfn id=foobar>foobar</dfn></p>
+<p><dfn id=lol>lol</dfn></p>
+<p><a href=#foobar><code>foo<span title="">bar</span></code></a></p>
+<p><a href=#lol>lol</a></p>

File tests/xref-nested.src.html

+<!doctype html>
+<p><dfn>foobar</dfn></p>
+<p><dfn>lol</dfn></p>
+<p><code>foo<span title="">bar</span></code></p>
+<p><span>lol</span></p>