|
4089 - in trunk/Template: src/parsers/source_to_tst/implementations tests/r: msg#00259web.ezcomponents.cvs
Author: Raymond Bosman Date: 2006-11-27 16:23:03 +0100 (Mon, 27 Nov 2006) New Revision: 4089 Log: - Updated the test output. - Fixed bug regarding the block name. Added: trunk/Template/tests/regression_tests/blocks/correct/ trunk/Template/tests/regression_tests/blocks/correct/matching_block_0019.in trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0008.out trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0017.out trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0018.out Removed: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0019.in Modified: trunk/Template/src/parsers/source_to_tst/implementations/program.php trunk/Template/src/parsers/source_to_tst/implementations/switch_condition.php trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0009.out trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0011.out trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0012.out trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0013.out trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0014.out trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0015.out trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0016.out Modified: trunk/Template/src/parsers/source_to_tst/implementations/program.php =================================================================== --- trunk/Template/src/parsers/source_to_tst/implementations/program.php 2006-11-27 14:38:00 UTC (rev 4088) +++ trunk/Template/src/parsers/source_to_tst/implementations/program.php 2006-11-27 15:23:03 UTC (rev 4089) @@ -171,7 +171,7 @@ throw new ezcTemplateParserException( $this->parser->source, $this->startCursor, $this->currentCursor, - "Incorrect nesting in code, the block {" . $this->lastBlock->name . "} was not correctly terminated." ); + "Incorrect nesting in code, close block {/" . $this->lastBlock->name . "} expected." ); } // Get rid of whitespace for the block line of the program element @@ -233,7 +233,7 @@ if ( $this->lastBlock->name != $element->name ) { throw new ezcTemplateParserException( $this->parser->source, $this->startCursor, $this->currentCursor, - "The closing block {/".$element->name. "} does not match the opening block {". $this->lastBlockName->name ."}" ); + "Open and close block do not match: {". $this->lastBlock->name ."} and {/".$element->name. "}" ); } // Sanity check Modified: trunk/Template/src/parsers/source_to_tst/implementations/switch_condition.php =================================================================== --- trunk/Template/src/parsers/source_to_tst/implementations/switch_condition.php 2006-11-27 14:38:00 UTC (rev 4088) +++ trunk/Template/src/parsers/source_to_tst/implementations/switch_condition.php 2006-11-27 15:23:03 UTC (rev 4089) @@ -53,6 +53,7 @@ //$this->findNextElement(); $sw = new ezcTemplateCaseTstNode( $this->parser->source, $this->startCursor, $cursor ); + $sw->name = $name; // Set the name to either 'case' or 'default'. } // $el->name = 'switch'; $sw->isClosingBlock = true; Copied: trunk/Template/tests/regression_tests/blocks/correct/matching_block_0019.in (from rev 4087, trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0019.in) Property changes on: trunk/Template/tests/regression_tests/blocks/correct/matching_block_0019.in ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0008.out =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0008.out 2006-11-27 14:38:00 UTC (rev 4088) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0008.out 2006-11-27 15:23:03 UTC (rev 4089) @@ -0,0 +1,4 @@ +mock:5:11: Found closing block {/default} without an opening block. + +{/default} + ^ Property changes on: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0008.out ___________________________________________________________________ Name: svn:eol-style + native Modified: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0009.out =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0009.out 2006-11-27 14:38:00 UTC (rev 4088) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0009.out 2006-11-27 15:23:03 UTC (rev 4089) @@ -1,4 +1,4 @@ -mock:7:1: Incorrect nesting in code, the block {foreach} was not correctly terminated. +mock:7:1: Incorrect nesting in code, close block {/foreach} expected. {$foo} Modified: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0011.out =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0011.out 2006-11-27 14:38:00 UTC (rev 4088) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0011.out 2006-11-27 15:23:03 UTC (rev 4089) @@ -1,4 +1,4 @@ -mock:5:9: Found closing block {/while} which does not match previous block {foreach} +mock:5:9: Open and close block do not match: {foreach} and {/while} {/while} ^ Modified: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0012.out =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0012.out 2006-11-27 14:38:00 UTC (rev 4088) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0012.out 2006-11-27 15:23:03 UTC (rev 4089) @@ -1,4 +1,4 @@ -mock:5:13: Found closing block {/delimiter} which does not match previous block {foreach} +mock:5:13: Open and close block do not match: {foreach} and {/delimiter} {/delimiter} ^ Modified: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0013.out =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0013.out 2006-11-27 14:38:00 UTC (rev 4088) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0013.out 2006-11-27 15:23:03 UTC (rev 4089) @@ -1,4 +1,4 @@ -mock:5:6: Found closing block {/if} which does not match previous block {foreach} +mock:5:6: Open and close block do not match: {foreach} and {/if} {/if} ^ Modified: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0014.out =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0014.out 2006-11-27 14:38:00 UTC (rev 4088) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0014.out 2006-11-27 15:23:03 UTC (rev 4089) @@ -1,4 +1,4 @@ -mock:5:10: Found closing block {switch/} which does not match previous block {foreach} +mock:5:10: Open and close block do not match: {foreach} and {/switch} {/switch} ^ Modified: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0015.out =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0015.out 2006-11-27 14:38:00 UTC (rev 4088) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0015.out 2006-11-27 15:23:03 UTC (rev 4089) @@ -1,4 +1,4 @@ -mock:5:7: Found closing block {case/} which does not match previous block {foreach} +mock:5:8: Open and close block do not match: {foreach} and {/case} {/case} ^ Modified: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0016.out =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0016.out 2006-11-27 14:38:00 UTC (rev 4088) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0016.out 2006-11-27 15:23:03 UTC (rev 4089) @@ -1,4 +1,4 @@ -mock:5:10: Found closing block {default/} which does not match previous block {foreach} +mock:5:11: Open and close block do not match: {foreach} and {/default} {/default} ^ Added: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0017.out =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0017.out 2006-11-27 14:38:00 UTC (rev 4088) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0017.out 2006-11-27 15:23:03 UTC (rev 4089) @@ -0,0 +1,7 @@ +mock:7:1: Incorrect nesting in code, close block {/while} expected. + + {$foo} + + + +^ Property changes on: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0017.out ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0018.out =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0018.out 2006-11-27 14:38:00 UTC (rev 4088) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0018.out 2006-11-27 15:23:03 UTC (rev 4089) @@ -0,0 +1,4 @@ +mock:5:11: Open and close block do not match: {while} and {/foreach} + +{/foreach} + ^ Property changes on: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0018.out ___________________________________________________________________ Name: svn:eol-style + native Deleted: trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0019.in =================================================================== --- trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0019.in 2006-11-27 14:38:00 UTC (rev 4088) +++ trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0019.in 2006-11-27 15:23:03 UTC (rev 4089) @@ -1,6 +0,0 @@ -{* file: non_matching_block_0019.in *} -{var $foo = 1, $_false = false, $array = array( 1, 2 )} -{while $_false} - {$foo} -{/while} - |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | 4088 - in trunk/Template: src/functions tests tests/custom_blocks tests/regression_tests/custom_blocks/correct [eZComponents: Trunk]: 00259, Jan Borsodi |
|---|---|
| Next by Date: | 4090 - in trunk/Template/tests/regression_tests/blocks: correct incorrect [eZComponents: Trunk]: 00259, Raymond Bosman |
| Previous by Thread: | 4088 - in trunk/Template: src/functions tests tests/custom_blocks tests/regression_tests/custom_blocks/correct [eZComponents: Trunk]i: 00259, Jan Borsodi |
| Next by Thread: | 4090 - in trunk/Template/tests/regression_tests/blocks: correct incorrect [eZComponents: Trunk]: 00259, Raymond Bosman |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |