From: Subramanya Sastry Date: Wed, 26 Sep 2012 18:58:30 +0000 (-0500) Subject: New tests to check handling of tpl-name and tplarg-name clashes. X-Git-Tag: 1.31.0-rc.0~22268 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=bc3e0c08c2594c7eefdfa8fed51caa5632f23a5a;p=lhc%2Fweb%2Fwiklou.git New tests to check handling of tpl-name and tplarg-name clashes. Change-Id: I99180af6460b8925a64b751650aaae6163e4ac27 --- diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index fea9296e6b..b3b9262a92 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -4119,6 +4119,44 @@ section=1 ==Section 1== !! end +### +### Testing parsing of templates where a template arg +### has the same name as the template itself. +### + +!! article +Template:quote +!! text +{{{quote|{{{1}}} }}} +!! endarticle + +!!test +Templates: Template Name/Arg clash: 1. Use of positional param +!!input +{{quote|foo}} +!!result +

foo +

+!!end + +!!test +Templates: Template Name/Arg clash: 2. Use of named param +!!input +{{quote|quote=foo}} +!!result +

foo +

+!!end + +!!test +Templates: Template Name/Arg clash: 3. Use of named param with empty input +!!input +{{quote|quote}} +!!result +

quote +

+!!end + ### ### Parsoid-centric tests to stress Parsoid's ability to RT them unchanged ###