summaryrefslogtreecommitdiff
path: root/test/test-engines.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-engines.rb')
-rw-r--r--test/test-engines.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/test-engines.rb b/test/test-engines.rb
index 689daa6..b93f880 100644
--- a/test/test-engines.rb
+++ b/test/test-engines.rb
@@ -67,6 +67,31 @@ __END__
';
_buf.to_s
##
+- name: ruby2_options
+ lang: ruby
+ class: Eruby
+ options: { :bufname: '@_out_buf' }
+ input: |
+ <table>
+ <% for item in @items %>
+ <tr>
+ <td><%= i+1 %></td>
+ <td><%== list %></td>
+ </tr>
+ <% end %>
+ </table>
+ expected: |
+ @_out_buf = ''; @_out_buf << '<table>
+ '; for item in @items
+ @_out_buf << ' <tr>
+ <td>'; @_out_buf << ( i+1 ).to_s; @_out_buf << '</td>
+ <td>'; @_out_buf << Erubis::XmlHelper.escape_xml( list ); @_out_buf << '</td>
+ </tr>
+ '; end
+ @_out_buf << '</table>
+ ';
+ @_out_buf.to_s
+##
- name: php1
lang: php
class: Ephp