aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2009-06-01 22:28:19 -0400
committerWaylan Limberg <waylan@gmail.com>2009-06-05 22:25:53 -0400
commit32078141d9eff1498cf9da0635a32e04356ece2f (patch)
tree56b240ad21f4170f2a71242d5fbe1918381033ab
parent9df46194bd569635db33b8d450776257a05899c7 (diff)
downloadmarkdown-32078141d9eff1498cf9da0635a32e04356ece2f.tar.gz
markdown-32078141d9eff1498cf9da0635a32e04356ece2f.tar.bz2
markdown-32078141d9eff1498cf9da0635a32e04356ece2f.zip
Added safe_mode tests for the modes remove and replace.
-rw-r--r--markdown/tests/safe_mode/remove.html34
-rw-r--r--markdown/tests/safe_mode/remove.txt69
-rw-r--r--markdown/tests/safe_mode/replace.html34
-rw-r--r--markdown/tests/safe_mode/replace.txt69
-rw-r--r--markdown/tests/safe_mode/test.cfg6
5 files changed, 212 insertions, 0 deletions
diff --git a/markdown/tests/safe_mode/remove.html b/markdown/tests/safe_mode/remove.html
new file mode 100644
index 0000000..a1e1626
--- /dev/null
+++ b/markdown/tests/safe_mode/remove.html
@@ -0,0 +1,34 @@
+<p>Here's a simple block:</p>
+<p></p>
+<p>This should be a code block, though:</p>
+<pre><code>&lt;div&gt;
+ foo
+&lt;/div&gt;
+</code></pre>
+<p>As should this:</p>
+<pre><code>&lt;div&gt;foo&lt;/div&gt;
+</code></pre>
+<p>Now, nested:</p>
+<p></p>
+<p>This should just be an HTML comment:</p>
+<p></p>
+<p>Multiline:</p>
+<p></p>
+<p>Code block:</p>
+<pre><code>&lt;!-- Comment --&gt;
+</code></pre>
+<p>Just plain comment, with trailing spaces on the line:</p>
+<p></p>
+<p>Code:</p>
+<pre><code>&lt;hr /&gt;
+</code></pre>
+<p>Hr's:</p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p></p>
+<p></p> \ No newline at end of file
diff --git a/markdown/tests/safe_mode/remove.txt b/markdown/tests/safe_mode/remove.txt
new file mode 100644
index 0000000..14aa2dc
--- /dev/null
+++ b/markdown/tests/safe_mode/remove.txt
@@ -0,0 +1,69 @@
+Here's a simple block:
+
+<div>
+ foo
+</div>
+
+This should be a code block, though:
+
+ <div>
+ foo
+ </div>
+
+As should this:
+
+ <div>foo</div>
+
+Now, nested:
+
+<div>
+ <div>
+ <div>
+ foo
+ </div>
+ </div>
+</div>
+
+This should just be an HTML comment:
+
+<!-- Comment -->
+
+Multiline:
+
+<!--
+Blah
+Blah
+-->
+
+Code block:
+
+ <!-- Comment -->
+
+Just plain comment, with trailing spaces on the line:
+
+<!-- foo -->
+
+Code:
+
+ <hr />
+
+Hr's:
+
+<hr>
+
+<hr/>
+
+<hr />
+
+<hr>
+
+<hr/>
+
+<hr />
+
+<hr class="foo" id="bar" />
+
+<hr class="foo" id="bar"/>
+
+<hr class="foo" id="bar" >
+
diff --git a/markdown/tests/safe_mode/replace.html b/markdown/tests/safe_mode/replace.html
new file mode 100644
index 0000000..fdf666e
--- /dev/null
+++ b/markdown/tests/safe_mode/replace.html
@@ -0,0 +1,34 @@
+<p>Here's a simple block:</p>
+<p>[HTML_REMOVED]</p>
+<p>This should be a code block, though:</p>
+<pre><code>&lt;div&gt;
+ foo
+&lt;/div&gt;
+</code></pre>
+<p>As should this:</p>
+<pre><code>&lt;div&gt;foo&lt;/div&gt;
+</code></pre>
+<p>Now, nested:</p>
+<p>[HTML_REMOVED]</p>
+<p>This should just be an HTML comment:</p>
+<p>[HTML_REMOVED]</p>
+<p>Multiline:</p>
+<p>[HTML_REMOVED]</p>
+<p>Code block:</p>
+<pre><code>&lt;!-- Comment --&gt;
+</code></pre>
+<p>Just plain comment, with trailing spaces on the line:</p>
+<p>[HTML_REMOVED]</p>
+<p>Code:</p>
+<pre><code>&lt;hr /&gt;
+</code></pre>
+<p>Hr's:</p>
+<p>[HTML_REMOVED]</p>
+<p>[HTML_REMOVED]</p>
+<p>[HTML_REMOVED]</p>
+<p>[HTML_REMOVED]</p>
+<p>[HTML_REMOVED]</p>
+<p>[HTML_REMOVED]</p>
+<p>[HTML_REMOVED]</p>
+<p>[HTML_REMOVED]</p>
+<p>[HTML_REMOVED]</p> \ No newline at end of file
diff --git a/markdown/tests/safe_mode/replace.txt b/markdown/tests/safe_mode/replace.txt
new file mode 100644
index 0000000..14aa2dc
--- /dev/null
+++ b/markdown/tests/safe_mode/replace.txt
@@ -0,0 +1,69 @@
+Here's a simple block:
+
+<div>
+ foo
+</div>
+
+This should be a code block, though:
+
+ <div>
+ foo
+ </div>
+
+As should this:
+
+ <div>foo</div>
+
+Now, nested:
+
+<div>
+ <div>
+ <div>
+ foo
+ </div>
+ </div>
+</div>
+
+This should just be an HTML comment:
+
+<!-- Comment -->
+
+Multiline:
+
+<!--
+Blah
+Blah
+-->
+
+Code block:
+
+ <!-- Comment -->
+
+Just plain comment, with trailing spaces on the line:
+
+<!-- foo -->
+
+Code:
+
+ <hr />
+
+Hr's:
+
+<hr>
+
+<hr/>
+
+<hr />
+
+<hr>
+
+<hr/>
+
+<hr />
+
+<hr class="foo" id="bar" />
+
+<hr class="foo" id="bar"/>
+
+<hr class="foo" id="bar" >
+
diff --git a/markdown/tests/safe_mode/test.cfg b/markdown/tests/safe_mode/test.cfg
index d23e418..57f0b6a 100644
--- a/markdown/tests/safe_mode/test.cfg
+++ b/markdown/tests/safe_mode/test.cfg
@@ -1,2 +1,8 @@
[DEFAULT]
safe_mode=escape
+
+[remove]
+safe_mode=remove
+
+[replace]
+safe_mode=replace