Complete coverage of Parser::getTemplateDom()
authorKunal Mehta <legoktm@member.fsf.org>
Mon, 28 May 2018 06:05:48 +0000 (23:05 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Mon, 28 May 2018 06:17:50 +0000 (23:17 -0700)
This test covers the branch of code when the $mTplRedirCache is already
populated, by using the same template that redirects twice.

Change-Id: Ie0ce277c75366b7b060e0da6873175976621aff9

tests/parser/parserTests.txt

index bffc56e..216d7e5 100644 (file)
@@ -62,6 +62,12 @@ Template:Foo
 FOO
 !!endarticle
 
+!! article
+Template:redirect to foo
+!! text
+#REDIRECT [[Template:Foo]]
+!! endarticle
+
 !! article
 Template:Blank
 !! text
@@ -1861,6 +1867,17 @@ maxtemplatedepth=1
 </p>
 !! end
 
+!! test
+multiple templates that are redirects
+!! wikitext
+{{redirect to foo}}
+{{redirect to foo}}
+!! html
+<p>FOO
+FOO
+</p>
+!! end
+
 !! test
 Multiple comments should still parse as SOL-transparent
 !! options