From 99e861920d9b1db2f834fb7b5055c75b8fcc720b Mon Sep 17 00:00:00 2001
From: Kunal Mehta
Date: Sun, 27 May 2018 23:05:48 -0700
Subject: [PATCH] Complete coverage of Parser::getTemplateDom()
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 | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index bffc56ed11..216d7e5d3c 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -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
!! end
+!! test
+multiple templates that are redirects
+!! wikitext
+{{redirect to foo}}
+{{redirect to foo}}
+!! html
+FOO
+FOO
+
+!! end
+
!! test
Multiple comments should still parse as SOL-transparent
!! options
--
2.20.1