logo       

4082 - in trunk/Template: . src/parsers/source_to_tst/implementations src/s: msg#00251

web.ezcomponents.cvs

Subject: 4082 - in trunk/Template: . src/parsers/source_to_tst/implementations src/syntax_trees/tst/nodes tests/regression_tests/blocks/incorrect [eZComponents: Trunk]

Author: Raymond Bosman
Date: 2006-11-27 14:30:49 +0100 (Mon, 27 Nov 2006)
New Revision: 4082

Log:
- Fixed some error messages.
- Added some test output.

Added:

trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0002.out

trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0003.out

trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0004.out

trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0005.out
Modified:
trunk/Template/ChangeLog
trunk/Template/src/parsers/source_to_tst/implementations/program.php
trunk/Template/src/syntax_trees/tst/nodes/switch.php

Modified: trunk/Template/ChangeLog
===================================================================
--- trunk/Template/ChangeLog 2006-11-27 13:14:42 UTC (rev 4081)
+++ trunk/Template/ChangeLog 2006-11-27 13:30:49 UTC (rev 4082)
@@ -1,5 +1,6 @@
- Fixed issue #9601: wrong __isset implementation in Template/template.php
- Fixed an issue that the space before 'array append' threw an exception.
+- Fixed some parser exception error messages.


1.1beta2 - Monday 20 November 2006

Modified: trunk/Template/src/parsers/source_to_tst/implementations/program.php
===================================================================
--- trunk/Template/src/parsers/source_to_tst/implementations/program.php
2006-11-27 13:14:42 UTC (rev 4081)
+++ trunk/Template/src/parsers/source_to_tst/implementations/program.php
2006-11-27 13:30:49 UTC (rev 4082)
@@ -224,7 +224,8 @@
// Check for closing blocks that do not belong to an opening block.
if ( $this->lastBlock->parentBlock === null &&
$element->isClosingBlock )
{
- throw new ezcTemplateParserException( $this->parser->source,
$this->startCursor, $this->currentCursor, "Found the block pair: {".
$element->name."} .. {/". $element->name."} that cannot have a open and close
block." );
+ throw new ezcTemplateParserException( $this->parser->source,
$this->startCursor, $this->currentCursor,
+ "Found closing block {/". $element->name."} without an opening
block." );
}

// The name of the previous element must match the closing block,
@@ -232,7 +233,7 @@
if ( $this->lastBlock->name != $element->name )
{
throw new ezcTemplateParserException( $this->parser->source,
$this->startCursor, $this->currentCursor,
- "Found closing block {/" . $element->name . "} which does not
match previous block {" . $this->lastBlock->name . "}" );
+ "The closing block {/".$element->name. "} does not match the
opening block {". $this->lastBlockName->name ."}" );
}

// Sanity check

Modified: trunk/Template/src/syntax_trees/tst/nodes/switch.php
===================================================================
--- trunk/Template/src/syntax_trees/tst/nodes/switch.php 2006-11-27
13:14:42 UTC (rev 4081)
+++ trunk/Template/src/syntax_trees/tst/nodes/switch.php 2006-11-27
13:30:49 UTC (rev 4082)
@@ -31,6 +31,7 @@
{
parent::__construct( $source, $start, $end );
$this->condition = null;
+ $this->name = "switch";
}

public function getTreeProperties()

Added:
trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0002.out
===================================================================
---
trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0002.out
2006-11-27 13:14:42 UTC (rev 4081)
+++
trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0002.out
2006-11-27 13:30:49 UTC (rev 4082)
@@ -0,0 +1,4 @@
+mock:5:11: Found closing block {/foreach} without an opening block.
+
+{/foreach}
+ ^


Property changes on:
trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0002.out
___________________________________________________________________
Name: svn:eol-style
+ native

Added:
trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0003.out
===================================================================
---
trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0003.out
2006-11-27 13:14:42 UTC (rev 4081)
+++
trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0003.out
2006-11-27 13:30:49 UTC (rev 4082)
@@ -0,0 +1,4 @@
+mock:5:9: Found closing block {/while} without an opening block.
+
+{/while}
+ ^


Property changes on:
trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0003.out
___________________________________________________________________
Name: svn:eol-style
+ native

Added:
trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0004.out
===================================================================
---
trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0004.out
2006-11-27 13:14:42 UTC (rev 4081)
+++
trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0004.out
2006-11-27 13:30:49 UTC (rev 4082)
@@ -0,0 +1,4 @@
+mock:5:13: Found closing block {/delimiter} without an opening block.
+
+{/delimiter}
+ ^


Property changes on:
trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0004.out
___________________________________________________________________
Name: svn:eol-style
+ native

Added:
trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0005.out
===================================================================
---
trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0005.out
2006-11-27 13:14:42 UTC (rev 4081)
+++
trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0005.out
2006-11-27 13:30:49 UTC (rev 4082)
@@ -0,0 +1,4 @@
+mock:5:6: Found closing block {/if} without an opening block.
+
+{/if}
+ ^


Property changes on:
trunk/Template/tests/regression_tests/blocks/incorrect/non_matching_block_0005.out
___________________________________________________________________
Name: svn:eol-style
+ native



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise