Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#4592 closed defect (fixed)

dtl : for tag don't resolve variable

Reported by: guest Owned by: Neil Roberts
Priority: high Milestone:
Component: General Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

Here is an example test that fails.

function test_tag_for_resolve(t){

var dd = dojox.dtl;

var context = new dd.Context({

list: {items: ["apple", "banana", "lemon"]}, unplugged: "Torrey"

}); var template = new dd.Template("{% for item in list.items %}{% cycle 'Hot' 'Diarrhea' unplugged 'Extra' %} Pocket. {% endfor %}"); t.is("Hot Pocket. Diarrhea Pocket. Torrey Pocket. ", template.render(context)); Make sure that it doesn't break on re-render t.is("Hot Pocket. Diarrhea Pocket. Torrey Pocket. ", template.render(context));

}

Attachments (1)

proposed_patch.diff (477 bytes) - added by guest 12 years ago.
Proposed patch

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by guest

Attachment: proposed_patch.diff added

Proposed patch

comment:1 Changed 12 years ago by Neil Roberts

Owner: changed from anonymous to Neil Roberts
Status: newassigned

comment:2 Changed 12 years ago by Neil Roberts

Resolution: fixed
Status: assignedclosed

(In [10651]) Fixes #4592. Add unit test for nested loop variables, and fix related bug

comment:3 Changed 12 years ago by Neil Roberts

Great patch! Thanks

Note: See TracTickets for help on using tickets.