From 8233aad6ad0a4c5125e19bc6a838f84cf94e3cff Mon Sep 17 00:00:00 2001
From: Russ Ross
Date: Mon, 27 Jun 2011 19:35:40 -0600
Subject: [PATCH] preformatted html block tests
---
block_test.go | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 76 insertions(+)
diff --git a/block_test.go b/block_test.go
index b8903df..ae75f2b 100644
--- a/block_test.go
+++ b/block_test.go
@@ -473,3 +473,79 @@ func TestOrderedList(t *testing.T) {
}
doTestsBlock(t, tests, 0)
}
+
+func TestPreformattedHtml(t *testing.T) {
+ var tests = []string{
+ "\n",
+ "\n",
+
+ "\n
\n",
+ "\n
\n",
+
+ "\n
\nParagraph\n",
+ "\n
\nParagraph
\n",
+
+ "\n
\n",
+ "\n
\n",
+
+ "\nAnything here\n
\n",
+ "\nAnything here\n
\n",
+
+ "\n Anything here\n
\n",
+ "\n Anything here\n
\n",
+
+ "\nAnything here\n
\n",
+ "\nAnything here\n
\n",
+
+ "\nThis is *not* &proceessed\n
\n",
+ "\nThis is *not* &proceessed\n
\n",
+
+ "\n Something\n\n",
+ "\n Something\n
\n",
+
+ "\n Something here\n\n",
+ "
\n Something here\n\n",
+
+ "Paragraph\n
\nHere? >&<\n
\n",
+ "
Paragraph\n
\nHere? >&<\n
\n",
+
+ "Paragraph\n\n
\nHow about here? >&<\n
\n",
+ "
Paragraph
\n\n
\nHow about here? >&<\n
\n",
+
+ "Paragraph\n
\nHere? >&<\n
\nAnd here?\n",
+ "
Paragraph\n
\nHere? >&<\n
\nAnd here?\n",
+
+ "Paragraph\n\n
\nHow about here? >&<\n
\nAnd here?\n",
+ "
Paragraph
\n\n
\nHow about here? >&<\n
\nAnd here?\n",
+
+ "Paragraph\n
\nHere? >&<\n
\n\nAnd here?\n",
+ "
Paragraph\n
\nHere? >&<\n
\n\n
And here?
\n",
+
+ "Paragraph\n\n
\nHow about here? >&<\n
\n\nAnd here?\n",
+ "
Paragraph
\n\n
\nHow about here? >&<\n
\n\n
And here?
\n",
+ }
+ doTestsBlock(t, tests, 0)
+}
+
+func TestPreformattedHtmlLax(t *testing.T) {
+ var tests = []string{
+ "Paragraph\n
\nHere? >&<\n
\n",
+ "
Paragraph
\n\n
\nHere? >&<\n
\n",
+
+ "Paragraph\n\n
\nHow about here? >&<\n
\n",
+ "
Paragraph
\n\n
\nHow about here? >&<\n
\n",
+
+ "Paragraph\n
\nHere? >&<\n
\nAnd here?\n",
+ "
Paragraph
\n\n
\nHere? >&<\n
\n\n
And here?
\n",
+
+ "Paragraph\n\n
\nHow about here? >&<\n
\nAnd here?\n",
+ "
Paragraph
\n\n
\nHow about here? >&<\n
\n\n
And here?
\n",
+
+ "Paragraph\n
\nHere? >&<\n
\n\nAnd here?\n",
+ "
Paragraph
\n\n
\nHere? >&<\n
\n\n
And here?
\n",
+
+ "Paragraph\n\n
\nHow about here? >&<\n
\n\nAnd here?\n",
+ "
Paragraph
\n\n
\nHow about here? >&<\n
\n\n
And here?
\n",
+ }
+ doTestsBlock(t, tests, EXTENSION_LAX_HTML_BLOCKS)
+}