|
4094 - in trunk/Template: src/syntax_trees/tst/nodes tests/regression_tests: msg#00264web.ezcomponents.cvs
Author: Raymond Bosman Date: 2006-11-28 10:04:14 +0100 (Tue, 28 Nov 2006) New Revision: 4094 Log: - Added test output. - Default and case blocks cannot be used inside the program block. Added: trunk/Template/tests/regression_tests/blocks/correct/matching_block_0081.in trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0080.out Removed: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0081.in Modified: trunk/Template/src/syntax_trees/tst/nodes/block.php trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0073.out trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0074.out trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0075.out trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0076.out trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0077.out trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0078.out trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0079.out Modified: trunk/Template/src/syntax_trees/tst/nodes/block.php =================================================================== --- trunk/Template/src/syntax_trees/tst/nodes/block.php 2006-11-28 08:35:41 UTC (rev 4093) +++ trunk/Template/src/syntax_trees/tst/nodes/block.php 2006-11-28 09:04:14 UTC (rev 4094) @@ -250,6 +250,14 @@ sprintf( ezcTemplateSourceToTstErrorMessages::MSG_UNEXPECTED_BLOCK, $element->name ) ); } + if ( $element instanceof ezcTemplateCaseTstNode ) + { + throw new ezcTemplateParserException( $element->source, $element->startCursor, $element->startCursor, + sprintf( ezcTemplateSourceToTstErrorMessages::MSG_UNEXPECTED_BLOCK, $element->name ) ); + } + + + $this->children[] = $element; // temporary compatability Copied: trunk/Template/tests/regression_tests/blocks/correct/matching_block_0081.in (from rev 4087, trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0081.in) Modified: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0073.out =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0073.out 2006-11-28 08:35:41 UTC (rev 4093) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0073.out 2006-11-28 09:04:14 UTC (rev 4094) @@ -1,7 +1,4 @@ -mock:7:1: Incorrect nesting in code, close block {/default} expected. +mock:3:9: Unexpected block {default} at this position. Some blocks can only be used inside other blocks. - {$foo} - - - -^ +{default} + ^ Modified: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0074.out =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0074.out 2006-11-28 08:35:41 UTC (rev 4093) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0074.out 2006-11-28 09:04:14 UTC (rev 4094) @@ -1,4 +1,4 @@ -mock:5:11: Open and close block do not match: {default} and {/foreach} +mock:3:9: Unexpected block {default} at this position. Some blocks can only be used inside other blocks. -{/foreach} - ^ +{default} + ^ Modified: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0075.out =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0075.out 2006-11-28 08:35:41 UTC (rev 4093) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0075.out 2006-11-28 09:04:14 UTC (rev 4094) @@ -1,4 +1,4 @@ -mock:5:9: Open and close block do not match: {default} and {/while} +mock:3:9: Unexpected block {default} at this position. Some blocks can only be used inside other blocks. -{/while} +{default} ^ Modified: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0076.out =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0076.out 2006-11-28 08:35:41 UTC (rev 4093) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0076.out 2006-11-28 09:04:14 UTC (rev 4094) @@ -1,4 +1,4 @@ -mock:5:13: Open and close block do not match: {default} and {/delimiter} +mock:3:9: Unexpected block {default} at this position. Some blocks can only be used inside other blocks. -{/delimiter} - ^ +{default} + ^ Modified: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0077.out =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0077.out 2006-11-28 08:35:41 UTC (rev 4093) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0077.out 2006-11-28 09:04:14 UTC (rev 4094) @@ -1,4 +1,4 @@ -mock:5:6: Open and close block do not match: {default} and {/if} +mock:3:9: Unexpected block {default} at this position. Some blocks can only be used inside other blocks. -{/if} - ^ +{default} + ^ Modified: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0078.out =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0078.out 2006-11-28 08:35:41 UTC (rev 4093) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0078.out 2006-11-28 09:04:14 UTC (rev 4094) @@ -1,4 +1,4 @@ -mock:5:10: Open and close block do not match: {default} and {/switch} +mock:3:9: Unexpected block {default} at this position. Some blocks can only be used inside other blocks. -{/switch} - ^ +{default} + ^ Modified: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0079.out =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0079.out 2006-11-28 08:35:41 UTC (rev 4093) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0079.out 2006-11-28 09:04:14 UTC (rev 4094) @@ -1,4 +1,4 @@ -mock:5:8: Open and close block do not match: {default} and {/case} +mock:3:9: Unexpected block {default} at this position. Some blocks can only be used inside other blocks. -{/case} - ^ +{default} + ^ Added: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0080.out =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0080.out 2006-11-28 08:35:41 UTC (rev 4093) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0080.out 2006-11-28 09:04:14 UTC (rev 4094) @@ -0,0 +1,4 @@ +mock:3:9: Unexpected block {default} at this position. Some blocks can only be used inside other blocks. + +{default} + ^ Property changes on: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0080.out ___________________________________________________________________ Name: svn:eol-style + native Deleted: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0081.in =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0081.in 2006-11-28 08:35:41 UTC (rev 4093) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0081.in 2006-11-28 09:04:14 UTC (rev 4094) @@ -1,8 +0,0 @@ -{* file: non_matching_block_0081.in *} -{var $foo = 1, $_false = false, $array = array( 1, 2 )} -{foreach $array as $bar} - - {$foo} - -{/foreach} - |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | 4093 - in trunk/Template: src src/parsers/source_to_tst/implementations tests/regression_tests/blocks/incorrect [eZComponents: Trunk]: 00264, Raymond Bosman |
|---|---|
| Next by Date: | 4095 - in trunk/Template/tests/regression_tests/blocks: correct incorrect [eZComponents: Trunk]: 00264, Raymond Bosman |
| Previous by Thread: | 4093 - in trunk/Template: src src/parsers/source_to_tst/implementations tests/regression_tests/blocks/incorrect [eZComponents: Trunk]i: 00264, Raymond Bosman |
| Next by Thread: | 4095 - in trunk/Template/tests/regression_tests/blocks: correct incorrect [eZComponents: Trunk]: 00264, Raymond Bosman |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |