Index: java/server/src/test/resources/endtoend/opensocial-templates/compiler_test.js |
=================================================================== |
--- java/server/src/test/resources/endtoend/opensocial-templates/compiler_test.js (revision 785321) |
+++ java/server/src/test/resources/endtoend/opensocial-templates/compiler_test.js (working copy) |
@@ -25,8 +25,8 @@ |
[ "hello ${Cur}", "'hello '+($this)" ], |
[ "$ ${Cur}", "'$ '+($this)" ], |
[ "$${Cur}", "'$'+($this)" ], |
- [ "${Cur} ${Context.Index}", "($this)+' '+($_ir($loop, 'Index'))"], |
- [ "a ${Cur} b ${Context.Index} c", "'a '+($this)+' b '+($_ir($loop, 'Index'))+' c'"] |
+ [ "${Cur} ${Context.Index}", "($this)+' '+($_ir($loop,'Index'))"], |
+ [ "a ${Cur} b ${Context.Index} c", "'a '+($this)+' b '+($_ir($loop,'Index'))+' c'"] |
]; |
for (var i = 0; i < values.length; i++) { |
var compiled = os.parseAttribute_(values[i][0]); |
@@ -52,23 +52,23 @@ |
* "foo(bar)[baz]" |
*/ |
function testWrapIdentifiers() { |
- assertEquals("$_ir($_ir($context, 'foo'), 'bar')", |
+ assertEquals("$_ir($_ir($context,'foo'),'bar')", |
os.wrapIdentifiersInExpression("foo.bar")); |
- assertEquals("$_ir($_ir($context, 'data'), 'array')()", |
+ assertEquals("$_ir($_ir($context,'data'),'array')()", |
os.wrapIdentifiersInExpression("data.array()")); |
- assertEquals("$_ir($_ir($context, 'data')(), 'array')", |
+ assertEquals("$_ir(data(),'array')", |
os.wrapIdentifiersInExpression('data().array')); |
// Check that namespaced tags are treated as single identifiers. |
- assertEquals("$_ir($context, 'os:Item')", |
+ assertEquals("$_ir($context,'os:Item')", |
os.wrapIdentifiersInExpression("os:Item")); |
// Check that a colon surrounded by spaces is not treated as |
// part of identifier |
- assertEquals("$_ir($context, 'foo') ? $_ir($context, 'bar') : " + |
- "$_ir($context, 'baz')", |
+ assertEquals("$_ir($context,'foo')?$_ir($context,'bar'):" + |
+ "$_ir($context,'baz')", |
os.wrapIdentifiersInExpression("foo ? bar : baz")); |
} |
@@ -194,7 +194,7 @@ |
var src = '<div repeat="foo">a</div>'; |
var template = os.compileTemplateString(src); |
var select = template.templateRoot_.firstChild.getAttribute("jsselect"); |
- assertEquals("$_ir($context, 'foo', $_ea)", select); |
+ assertEquals("$_ir($context,'foo',$_ea)", select); |
} |
function testGetFromContext() { |