r18184 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r18183‎ | r18184 | r18185 >
Date:15:45, 5 December 2006
Author:sanbeg
Status:old
Tags:
Comment:
Add parser tests for cycle detection
Modified paths:
  • /trunk/extensions/LabeledSectionTransclusion/lstParserTests.txt (modified) (history)

Diff [purge]

Index: trunk/extensions/LabeledSectionTransclusion/lstParserTests.txt
@@ -281,3 +281,33 @@
282282 <p>slash
283283 </p>
284284 !!end
 285+
 286+# We can't use the simplest case where the article transcludes itself
 287+# from a regression test (bug 8158). This test will segv if the cycle
 288+# detection code in the extension fails.
 289+!!article
 290+cycle
 291+!!text
 292+<section begin=cycle/>{{#lst:cycle|cycle}}<section end=cycle/>
 293+!!endarticle
 294+!!test
 295+cycle detection
 296+!!options
 297+!!input
 298+{{#lst:cycle|cycle}}
 299+!!result
 300+<p><a href="https://www.mediawiki.org/wiki/Cycle" title="Cycle">Cycle</a>
 301+</p>
 302+!!end
 303+
 304+#make sure we can still multiply-transclude (that is, path is cleared)
 305+!!test
 306+multiple transclude
 307+!!input
 308+{{#lst:sections|1}}
 309+{{#lst:sections|1}}
 310+!!result
 311+<p>sec 1
 312+sec 1
 313+</p>
 314+!!end