aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorbenjaoming <benjaoming@gmail.com>2013-02-18 11:24:13 +0100
committerbenjaoming <benjaoming@gmail.com>2013-02-18 11:24:13 +0100
commitf6a075a3a907c0e03e80cc69b61e3205c89feb2a (patch)
treea6a11ad14404fdbf943036d686bf078c61061fd3 /tests
parent9735b54f17ae31b240ad00b0e7e3d3423f447789 (diff)
downloadmarkdown-f6a075a3a907c0e03e80cc69b61e3205c89feb2a.tar.gz
markdown-f6a075a3a907c0e03e80cc69b61e3205c89feb2a.tar.bz2
markdown-f6a075a3a907c0e03e80cc69b61e3205c89feb2a.zip
adding test for out of order headlines
Diffstat (limited to 'tests')
-rw-r--r--tests/extensions/test.cfg3
-rw-r--r--tests/extensions/toc_out_of_order.html8
-rw-r--r--tests/extensions/toc_out_of_order.txt5
3 files changed, 16 insertions, 0 deletions
diff --git a/tests/extensions/test.cfg b/tests/extensions/test.cfg
index 4efd837..7f082cf 100644
--- a/tests/extensions/test.cfg
+++ b/tests/extensions/test.cfg
@@ -12,6 +12,9 @@ extensions=toc
[toc_invalid]
extensions=toc
+[toc_out_of_order]
+extensions=toc
+
[toc_nested]
extensions=toc
diff --git a/tests/extensions/toc_out_of_order.html b/tests/extensions/toc_out_of_order.html
new file mode 100644
index 0000000..93d8b04
--- /dev/null
+++ b/tests/extensions/toc_out_of_order.html
@@ -0,0 +1,8 @@
+<div class="toc">
+<ul>
+<li><a href="#header-2">Header 2</a></li>
+<li><a href="#header-1">Header 1</a></li>
+</ul>
+</div>
+<h2 id="header-2">Header 2</h2>
+<h1 id="header-1">Header 1</h1> \ No newline at end of file
diff --git a/tests/extensions/toc_out_of_order.txt b/tests/extensions/toc_out_of_order.txt
new file mode 100644
index 0000000..f08bdbc
--- /dev/null
+++ b/tests/extensions/toc_out_of_order.txt
@@ -0,0 +1,5 @@
+[TOC]
+
+## Header 2
+
+# Header 1