From ab2b4eeae89f9a677ebe762219d2460d06a09c41 Mon Sep 17 00:00:00 2001 From: Subramanya Sastry Date: Fri, 21 Sep 2012 12:22:30 -0500 Subject: [PATCH] P-wrapping tests to spec. existing behavior to assist Parsoid. * Block tags on a line change paragraph wrapping behavior for that line and previous lines. Added tests that captures how the PHP parser currently deals with it so that Parsoid can emulate this correctly. Change-Id: I0bcddd2a6d64502d80f4a8155bcd1425bd5db7be --- tests/parser/parserTests.txt | 83 +++++++++++++++++++++++++++++++++++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index aa084cc271..43d42715c3 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -510,7 +510,7 @@ Comment test 1 !! end !! test -Comment test 2 +Comment test 2a !! input asdf @@ -521,6 +521,19 @@ jkl

!! end +!! test +Comment test 2b +!! input +asdf + + +jkl +!! result +

asdf +

jkl +

+!! end + !! test Comment test 3 !! input @@ -633,6 +646,74 @@ b

!! end +!! test +Comment on its own line post-expand with non-significant whitespace +!! input +a + {{blank}} +b +!! result +

a +

b +

+!! end + +### +### paragraph wraping tests +### +!! test +No block tags +!! input +a + +b +!! result +

a +

b +

+!! end +!! test +Block tag on one line +!! input +a
foo
+ +b +!! result +a
foo
+

b +

+!! end + +!! test +Block tag on both lines +!! input +a
foo
+ +b
foo
+!! result +a
foo
+b
foo
+ +!! end + +!! test +Multiple lines without block tags +!! input +
foo
a +b +c +d e +x
foo
z +!! result +
foo
a +

b +c +d e +

+x
foo
z + +!! end + ### ### Preformatted text ### -- 2.20.1