Add new parserTests for image attributes coming from templates.
authorC. Scott Ananian <cscott@cscott.net>
Tue, 30 Jul 2013 20:17:57 +0000 (16:17 -0400)
committerC. Scott Ananian <cscott@cscott.net>
Tue, 30 Jul 2013 20:51:13 +0000 (16:51 -0400)
Bug: 49400
Change-Id: I49e92f5ddf9ee32347e6b738329f16f9ca129888

tests/parser/parserTests.txt

index e7cd420..5e5931a 100644 (file)
@@ -126,6 +126,13 @@ Template:table_cells
 {{table_attribs}} || Bar || Baz
 !! endarticle
 
+!! article
+Template:image_attribs
+!! text
+<noinclude>
+[[File:foobar.jpg|</noinclude>right|Caption text<noinclude>]]</noinclude>
+!! endarticle
+
 !! article
 A?b
 !! text
@@ -7881,6 +7888,15 @@ Image with empty attribute
 
 !! end
 
+!! test
+Image with attributes from template.
+!! input
+[[Image:foobar.jpg|{{image_attribs}}]]
+!! result
+<div class="floatright"><a href="/wiki/File:Foobar.jpg" class="image" title="Caption text"><img alt="Caption text" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div>
+
+!! end
+
 !! test
 Image with link tails
 !! input