diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-10-05 11:48:54 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-10-05 11:52:55 -0500 |
commit | d6ad2d3c6ee63fc8493b47e4f4b82e1804bfac5f (patch) | |
tree | 12477aa52988a5873aeb774d9af92bd695498bf1 /t | |
parent | 4954d01527cc7f33dfd906faf2f1941d63055c4c (diff) | |
download | text-handlebars-d6ad2d3c6ee63fc8493b47e4f4b82e1804bfac5f.tar.gz text-handlebars-d6ad2d3c6ee63fc8493b47e4f4b82e1804bfac5f.zip |
support {{@index}}
Diffstat (limited to 't')
-rw-r--r-- | t/blocks.t | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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; |