issue 697: Fixed a bug for wrong compiling switch statement

switch 문이 간혹 잘못 컴파일되던 버그 수정


git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9771 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
taggon 2011-10-27 06:43:54 +00:00
parent 22591f44b0
commit 0d56b9038b
2 changed files with 9 additions and 7 deletions

View file

@ -81,8 +81,8 @@ class TemplateHandlerTest extends PHPUnit_Framework_TestCase
),
// <!--@switch--> ~ <!--@case--> ~ <!--@break--> ~ <!--@default --> ~ <!--@endswitch-->
array(
'<dummy /><!--@switch($var)--><!--@case("A")-->A<!--@break--><!--@case("B")-->B<!--@break--><!--@default-->C<!--@endswitch--><dummy />',
'<dummy /><?php switch($__Context->var){ ?><?php case "A": ?>A<?php break; ?><?php case "B": ?>B<?php break; ?><?php default : ?>C<?php } ?><dummy />'
'<dummy /><!--@switch($var)--> <!--@case("A")--> A<!--@break--> <!--@case(\'B\')-->B<!--@break--><!--@default-->C<!--@endswitch--><dummy />',
'<dummy /><?php switch($__Context->var){ ?><?php case "A": ?> A<?php break; ?><?php case \'B\': ?>B<?php break; ?><?php default : ?>C<?php } ?><dummy />'
),
// invalid block statement
array(