Index: trunk/extensions/LabeledSectionTransclusion/lstParserTests.txt |
— | — | @@ -281,3 +281,33 @@ |
282 | 282 | <p>slash |
283 | 283 | </p> |
284 | 284 | !!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 |