From cc452998dc1af441cf3f9c5d0c7287cb5de48c4a Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Sat, 30 May 2009 22:29:56 -0400 Subject: Initial implementation of nose testing. Still some cleanup to do, but this shows the differances between the old and the new. Also left one test failing (unsignificant white space only) to demonstrate what a failing test looks like. --- tests/safe_mode/test.cfg | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/safe_mode/test.cfg (limited to 'tests/safe_mode') diff --git a/tests/safe_mode/test.cfg b/tests/safe_mode/test.cfg new file mode 100644 index 0000000..d23e418 --- /dev/null +++ b/tests/safe_mode/test.cfg @@ -0,0 +1,2 @@ +[DEFAULT] +safe_mode=escape -- cgit v1.2.3 From 8b430d251b2518fa3303d7027f50268e0254b7a1 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Sat, 30 May 2009 22:31:55 -0400 Subject: Moves tests to a subdir of the markdown lib. --- tests/safe_mode/inline-html-advanced.html | 11 ----- tests/safe_mode/inline-html-advanced.txt | 14 ------- tests/safe_mode/inline-html-comments.html | 8 ---- tests/safe_mode/inline-html-comments.txt | 13 ------ tests/safe_mode/inline-html-simple.html | 45 -------------------- tests/safe_mode/inline-html-simple.txt | 69 ------------------------------- tests/safe_mode/script_tags.html | 28 ------------- tests/safe_mode/script_tags.txt | 33 --------------- tests/safe_mode/test.cfg | 2 - tests/safe_mode/unsafe_urls.html | 20 --------- tests/safe_mode/unsafe_urls.txt | 27 ------------ 11 files changed, 270 deletions(-) delete mode 100644 tests/safe_mode/inline-html-advanced.html delete mode 100644 tests/safe_mode/inline-html-advanced.txt delete mode 100644 tests/safe_mode/inline-html-comments.html delete mode 100644 tests/safe_mode/inline-html-comments.txt delete mode 100644 tests/safe_mode/inline-html-simple.html delete mode 100644 tests/safe_mode/inline-html-simple.txt delete mode 100644 tests/safe_mode/script_tags.html delete mode 100644 tests/safe_mode/script_tags.txt delete mode 100644 tests/safe_mode/test.cfg delete mode 100644 tests/safe_mode/unsafe_urls.html delete mode 100644 tests/safe_mode/unsafe_urls.txt (limited to 'tests/safe_mode') diff --git a/tests/safe_mode/inline-html-advanced.html b/tests/safe_mode/inline-html-advanced.html deleted file mode 100644 index e9dd2ec..0000000 --- a/tests/safe_mode/inline-html-advanced.html +++ /dev/null @@ -1,11 +0,0 @@ -

Simple block on one line:

-

<div>foo</div>

-

And nested without indentation:

-

<div> -<div> -<div> -foo -</div> -</div> -<div>bar</div> -</div>

\ No newline at end of file diff --git a/tests/safe_mode/inline-html-advanced.txt b/tests/safe_mode/inline-html-advanced.txt deleted file mode 100644 index 9d71ddc..0000000 --- a/tests/safe_mode/inline-html-advanced.txt +++ /dev/null @@ -1,14 +0,0 @@ -Simple block on one line: - -
foo
- -And nested without indentation: - -
-
-
-foo -
-
-
bar
-
diff --git a/tests/safe_mode/inline-html-comments.html b/tests/safe_mode/inline-html-comments.html deleted file mode 100644 index 0f1e417..0000000 --- a/tests/safe_mode/inline-html-comments.html +++ /dev/null @@ -1,8 +0,0 @@ -

Paragraph one.

-

<!-- This is a simple comment -->

-

<!-- - This is another comment. --->

-

Paragraph two.

-

<!-- one comment block -- -- with two comments -->

-

The end.

\ No newline at end of file diff --git a/tests/safe_mode/inline-html-comments.txt b/tests/safe_mode/inline-html-comments.txt deleted file mode 100644 index 41d830d..0000000 --- a/tests/safe_mode/inline-html-comments.txt +++ /dev/null @@ -1,13 +0,0 @@ -Paragraph one. - - - - - -Paragraph two. - - - -The end. diff --git a/tests/safe_mode/inline-html-simple.html b/tests/safe_mode/inline-html-simple.html deleted file mode 100644 index ad19a77..0000000 --- a/tests/safe_mode/inline-html-simple.html +++ /dev/null @@ -1,45 +0,0 @@ -

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" >

\ No newline at end of file diff --git a/tests/safe_mode/inline-html-simple.txt b/tests/safe_mode/inline-html-simple.txt deleted file mode 100644 index 14aa2dc..0000000 --- a/tests/safe_mode/inline-html-simple.txt +++ /dev/null @@ -1,69 +0,0 @@ -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/tests/safe_mode/script_tags.html b/tests/safe_mode/script_tags.html deleted file mode 100644 index df63ffc..0000000 --- a/tests/safe_mode/script_tags.html +++ /dev/null @@ -1,28 +0,0 @@ -

This should be stripped/escaped in safe_mode.

-

<script> -alert("Hello world!") -</script>

-

With blank lines.

-

<script> - -alert("Hello world!") - -</script>

-

Now with some weirdness

-

<script <!-- -alert("Hello world!") -</script <> `

-

Try another way.

-

<script <!-- -alert("Hello world!") -</script <> - -This time with blank lines. - -<script <!-- - -alert("Hello world!") - -</script <> - -

\ No newline at end of file diff --git a/tests/safe_mode/script_tags.txt b/tests/safe_mode/script_tags.txt deleted file mode 100644 index 44041c2..0000000 --- a/tests/safe_mode/script_tags.txt +++ /dev/null @@ -1,33 +0,0 @@ -This should be stripped/escaped in safe_mode. - - - -With blank lines. - - - -Now with some weirdness - -`` - -This time with blank lines. - - + +With blank lines. + + + +Now with some weirdness + +`` + +This time with blank lines. + +