From 85b9dda5d2e40d9dccf0ef22356d86ada8ea299c Mon Sep 17 00:00:00 2001 From: Sam Mousa Date: Mon, 6 Aug 2012 17:10:50 +0200 Subject: [PATCH] Added a testcase for EM for the new functionality that removes escape chars from curly braces. --- application/helpers/expressions/em_manager_helper.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/helpers/expressions/em_manager_helper.php b/application/helpers/expressions/em_manager_helper.php index ce5f7cafad3..05bb653c96e 100644 --- a/application/helpers/expressions/em_manager_helper.php +++ b/application/helpers/expressions/em_manager_helper.php @@ -6878,6 +6878,7 @@ static function UnitTestProcessStringContainingExpressions() ); $tests = <<Here is an example of OK syntax with tooltips
Hello {if(gender=='M','Mr.','Mrs.')} {surname}, it is now {date('g:i a',time())}. Do you know where your {sum(numPets,numKids)} chidren and pets are? Here are common errors so you can see the tooltips
Variables used before they are declared: {notSetYet}
Unknown Function: {iff(numPets>numKids,1,2)}
Unknown Variable: {sum(age,num_pets,numKids)}
Wrong # parameters: {sprintf()},{if(1,2)},{date()}
Assign read-only-vars:{TOKEN:ATTRIBUTE_1+=10},{name='Sally'}
Unbalanced parentheses: {pow(3,4},{(pow(3,4)},{pow(3,4))} Here is some of the unsupported syntax
No support for '++', '--', '%',';': {min(++age, --age,age % 2);}
Nor '|', '&', '^': {(sum(2 | 3,3 & 4,5 ^ 6)}}
Nor arrays: {name[2], name['mine']}