From 957eda4219e5646dc713785dc836d9d66d6e856c Mon Sep 17 00:00:00 2001 From: Subramanya Sastry Date: Thu, 11 Oct 2012 11:54:09 -0500 Subject: [PATCH] Additional tests to keep Parsoid on track. Change-Id: Ic57c10f8e5ff16446834af4a22043465aa0495ce --- tests/parser/parserTests.txt | 57 +++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 61cf508a57..c9d916d08f 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -71,6 +71,12 @@ Template:echo {{{1}}} !! endarticle +!! article +Template:attr_str +!! text +{{{1}}}="{{{2}}}" +!! endarticle + ### ### Basic tests ### @@ -4046,6 +4052,14 @@ Template parameter as link source

!! end +!!test +Template-generated attribute string (k='v') +!!input +bar +!!result +

bar +

+!!end !!article Template:paramtest2 @@ -4325,6 +4339,15 @@ section=1 ### ### and in attributes ### +!!test +0. includeonly around the entire attribute +!!input +id="v1"id="v2">bar +!!result +

bar +

+!!end + !!test 1. includeonly in html attr key !!input @@ -5363,6 +5386,15 @@ Image with caption !! end +!! test +Image with empty attribute +!! input +[[Image:foobar.jpg|right||Caption text]] +!! result +
Caption text
+ +!! end + !! test Image with link parameter, wiki target !! input @@ -11158,31 +11190,8 @@ HttP://MediaWiki.Org/ ### Parsoids-specific tests ### Parsoid-PHP parser incompatibilities ### - -!!test -1. includeonly around the entire attribute -!!options -disabled -!!input -id="v1"id="v2">bar -!!result -

bar -

-!!end - -!!test -2. template around the entire attribute -!!options -disabled -!!input -bar -!!result -

bar -

-!!end - !!test -3. SOL-sensitive wikitext tokens as template-args +1. SOL-sensitive wikitext tokens as template-args !!options disabled !!input -- 2.20.1