Tag names can't contain template parameters (thanksfully)
authorPlatonides <platonides@users.mediawiki.org>
Wed, 4 May 2011 14:40:25 +0000 (14:40 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Wed, 4 May 2011 14:40:25 +0000 (14:40 +0000)
tests/phpunit/includes/parser/PreprocessorTest.php

index dd4d4bd..7a5948d 100644 (file)
@@ -38,6 +38,8 @@ class PreprocessorTest extends MediaWikiTestCase {
                        array( "<noinclude>\n{{Foo}}\n</noinclude>", "<root><ignore>&lt;noinclude&gt;</ignore>\n<template lineStart=\"1\"><title>Foo</title></template>\n<ignore>&lt;/noinclude&gt;</ignore></root>" ),
                        array( "<noinclude>\n{{Foo}}\n</noinclude>\n", "<root><ignore>&lt;noinclude&gt;</ignore>\n<template lineStart=\"1\"><title>Foo</title></template>\n<ignore>&lt;/noinclude&gt;</ignore>\n</root>" ),
                        array( "<gallery>foo bar", "<root><ext><name>gallery</name><attr></attr><inner>foo bar</inner></ext></root>" ),
+                       array( "<{{foo}}>", "<root>&lt;<template><title>foo</title></template>&gt;</root>" ),
+                       array( "<{{{foo}}}>", "<root>&lt;<tplarg><title>foo</title></tplarg>&gt;</root>" ),
                        array( "<gallery></gallery</gallery>", "<root><ext><name>gallery</name><attr></attr><inner>&lt;/gallery</inner><close>&lt;/gallery&gt;</close></ext></root>" ),
                        array( "=== Foo === ", "<root><h level=\"3\" i=\"1\">=== Foo === </h></root>" ),
                        array( "==<!-- -->= Foo === ", "<root><h level=\"2\" i=\"1\">==<comment>&lt;!-- --&gt;</comment>= Foo === </h></root>" ),