From 32078141d9eff1498cf9da0635a32e04356ece2f Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Mon, 1 Jun 2009 22:28:19 -0400 Subject: Added safe_mode tests for the modes remove and replace. --- markdown/tests/safe_mode/remove.html | 34 +++++++++++++++++ markdown/tests/safe_mode/remove.txt | 69 +++++++++++++++++++++++++++++++++++ markdown/tests/safe_mode/replace.html | 34 +++++++++++++++++ markdown/tests/safe_mode/replace.txt | 69 +++++++++++++++++++++++++++++++++++ markdown/tests/safe_mode/test.cfg | 6 +++ 5 files changed, 212 insertions(+) create mode 100644 markdown/tests/safe_mode/remove.html create mode 100644 markdown/tests/safe_mode/remove.txt create mode 100644 markdown/tests/safe_mode/replace.html create mode 100644 markdown/tests/safe_mode/replace.txt 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 @@ +

Here's a simple block:

+

+

This should be a code block, though:

+
<div>
+    foo
+</div>
+
+

As should this:

+
<div>foo</div>
+
+

Now, nested:

+

+

This should just be an HTML comment:

+

+

Multiline:

+

+

Code block:

+
<!-- Comment -->
+
+

Just plain comment, with trailing spaces on the line:

+

+

Code:

+
<hr />
+
+

Hr's:

+

+

+

+

+

+

+

+

+

\ 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: + +
+ foo +
+ +This should be a code block, though: + +
+ foo +
+ +As should this: + +
foo
+ +Now, nested: + +
+
+
+ foo +
+
+
+ +This should just be an HTML comment: + + + +Multiline: + + + +Code block: + + + +Just plain comment, with trailing spaces on the line: + + + +Code: + +
+ +Hr's: + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ 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 @@ +

Here's a simple block:

+

[HTML_REMOVED]

+

This should be a code block, though:

+
<div>
+    foo
+</div>
+
+

As should this:

+
<div>foo</div>
+
+

Now, nested:

+

[HTML_REMOVED]

+

This should just be an HTML comment:

+

[HTML_REMOVED]

+

Multiline:

+

[HTML_REMOVED]

+

Code block:

+
<!-- Comment -->
+
+

Just plain comment, with trailing spaces on the line:

+

[HTML_REMOVED]

+

Code:

+
<hr />
+
+

Hr's:

+

[HTML_REMOVED]

+

[HTML_REMOVED]

+

[HTML_REMOVED]

+

[HTML_REMOVED]

+

[HTML_REMOVED]

+

[HTML_REMOVED]

+

[HTML_REMOVED]

+

[HTML_REMOVED]

+

[HTML_REMOVED]

\ 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: + +
+ foo +
+ +This should be a code block, though: + +
+ foo +
+ +As should this: + +
foo
+ +Now, nested: + +
+
+
+ foo +
+
+
+ +This should just be an HTML comment: + + + +Multiline: + + + +Code block: + + + +Just plain comment, with trailing spaces on the line: + + + +Code: + +
+ +Hr's: + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ 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 -- cgit v1.2.3