Description: Check for the correct detection and handling of recursive and repeated includes [[%SCRIPTURL{"view"}%/%WEB%/%TOPIC%?test=compare&debugenableplugins=TestFixturePlugin&skin=pattern][run this test]] Designed by: Crawford Currie ---+ Recursion detection and avoidance ---++ Expected <noautolink> <!-- expected RECUSS --> There was an old Man of the coast There was an old Man of the coast <span class='twikiAlert'> <dl> <dt> Warning</dt><dd> Can't INCLUDE TestCases.RecursiveInclude repeatedly, topic is already included. </dd></dl> </span> Who placidly sat on a post; But when it was cold He relinquished his hold And called for some hot buttered toast. Who placidly sat on a post; But when it was cold He relinquished his hold And called for some hot buttered toast. <!-- /expected --> </noautolink> ---++ Actual <!-- actual --> %INCLUDE{"RecursiveInclude"}% %INCLUDE{"IncludeMeTwice"}% %INCLUDE{"IncludeMeTwice"}% <!-- /actual --> ---+ File not found ---++ Expected <noautolink> <!-- expected expand FNF --> <span class='twikiAlert'>Warning: Can't find topic TestCases.FileNotFound</span> <!-- /expected --> </noautolink> ---++ Actual <!-- actual --> %INCLUDE{"FileNotFound"}% <!-- /actual --> ---+ References to BASETOPIC and INCLUDINGTOPIC <!-- AAA hubba AAA tag string used for testing pattern --> ---+ Expected <!-- expected expand --> <p /> <a href="%SCRIPTURLPATH{view}%/%WEB%/%TOPIC%" class="twikiCurrentTopicLink twikiLink">%TOPIC%</a> <a href="%SCRIPTURLPATH{view}%/%WEB%/%TOPIC%" class="twikiCurrentTopicLink twikiLink">%TOPIC%</a> hubba <p /> <a href="%SCRIPTURLPATH{view}%/%WEB%/%TOPIC%" class="twikiCurrentTopicLink twikiLink">%TOPIC%</a> <a href="%SCRIPTURLPATH{view}%/%WEB%/IncludedTopic" class="twikiLink">IncludedTopic</a> <p /> <!-- /expected --> ---+ Actual <!-- actual --> %INCLUDE{"IncludedTopic"}% <!-- /actual --> ---+ Parameterized includes ---++ Expected <!-- expected PARAM --> %A% %B% %C% 1 2 3 %A% %B% %C% <!-- /expected --> ---++ Actual <!-- actual --> %A% %B% %C% %INCLUDE{"ParameterizedIncludeFixture" A="1" B="2" C="3"}% %A% %B% %C% <!-- /actual --> ---+ Include nothing ---++ Expected <!-- expected NOWT --><span class='twikiAlert'> Warning: Can't find topic ""."" </span><!-- /expected --> ---++ Actual <!-- actual -->%INCLUDE{""}%<!-- /actual --> ---+ Include nothing with warning ---++ Expected <!-- expected NOBBUTWARN --><!-- /expected --> ---++ Actual <!-- actual -->%INCLUDE{"" warn="off"}%<!-- /actual -->
This topic: TestCases
>
TestCaseAutoIncludes
Topic revision: r0 - 2015-11-29 - TWikiContributor
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback