From 375bfe62ef85a30705bb39a8fdd5e279793bdf47 Mon Sep 17 00:00:00 2001 From: Subramanya Sastry Date: Mon, 15 Oct 2012 12:01:54 -0500 Subject: [PATCH] Added ugly nesting and template interaction tests (to stress Parsoid). Change-Id: I244f682b458626e827888aa7eed0fb6ad26a9d97 --- tests/parser/parserTests.txt | 54 ++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 826df81d08..e62eb80f11 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -71,6 +71,18 @@ Template:echo {{{1}}} !! endarticle +!! article +Template:echo_with_span +!! text +{{{1}}} +!! endarticle + +!! article +Template:echo_with_div +!! text +
{{{1}}}
+!! endarticle + !! article Template:attr_str !! text @@ -4708,6 +4720,48 @@ Templates: Tables: 4f. Generating a single tag of a HTML table !!end +!!test +Templates: Ugly nesting: 1. Quotes opened/closed across templates (echo) +!!input +{{echo|''a}}{{echo|b''c''d}}{{echo|''e}} +!!result +

abcde +

+!!end + +!!test +Templates: Ugly nesting: 2. Quotes opened/closed across templates (echo_with_span) +(PHP parser generates misnested html) +!! options +disabled +!!input +{{echo_with_span|''a}}{{echo_with_span|b''c''d}}{{echo_with_span|''e}} +!!result +

abcde

+!!end + +!!test +Templates: Ugly nesting: 3. Quotes opened/closed across templates (echo_with_div) +(PHP parser generates misnested html) +!! options +disabled +!!input +{{echo_with_div|''a}}{{echo_with_div|b''c''d}}{{echo_with_div|''e}} +!!result +
a
+
bcd
+
e
+!!end + +!!test +Templates: Ugly nesting: 4. Divs opened/closed across templates +!!input +a
b{{echo|c
d}}e +!!result +a
bc
de + +!!end + !!test Parser Functions: 1. Simple example !!input -- 2.20.1