From d6ad2d3c6ee63fc8493b47e4f4b82e1804bfac5f Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 5 Oct 2012 11:48:54 -0500 Subject: support {{@index}} --- t/blocks.t | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 't') diff --git a/t/blocks.t b/t/blocks.t index 7cc68fe..8b44e9d 100644 --- a/t/blocks.t +++ b/t/blocks.t @@ -47,4 +47,18 @@ render_ok( "nested array of hashes block variable" ); +render_ok( + '{{#goodbyes}}{{@index}}. {{text}}! {{/goodbyes}}cruel {{world}}!', + { + goodbyes => [ + { text => 'goodbye' }, + { text => 'Goodbye' }, + { text => 'GOODBYE' }, + ], + world => 'world', + }, + '0. goodbye! 1. Goodbye! 2. GOODBYE! cruel world!', + "\@index variable" +); + done_testing; -- cgit v1.2.3-54-g00ecf