~ubuntu-branches/ubuntu/vivid/nqp/vivid-proposed

« back to all changes in this revision

Viewing changes to examples/rubyish/t/template.t

  • Committer: Package Import Robot
  • Author(s): Alessandro Ghedini
  • Date: 2013-11-01 12:09:18 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20131101120918-kx51sl0sxl3exsxi
Tags: 2013.10-1
* New upstream release
* Bump versioned (Build-)Depends on parrot
* Update patches
* Install new README.pod
* Fix vcs-field-not-canonical
* Do not install rubyish examples
* Do not Depends on parrot-devel anymore
* Add 07_disable-serialization-tests.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# eRubyish style templates
 
2
 
 
3
puts '1..10'
 
4
puts "ok 1 - statements before template"
 
5
 
 
6
<?rbi?>
 
7
ok 2 - initial template text
 
8
  <%n = 2 %>
 
9
  <%while (n+=1) < 5 %>ok #{n} - while loop test
 
10
  <%end%>
 
11
ok 5 - text between statements
 
12
  <%if n == 5 %>ok 6 - if block (true)
 
13
  <%else      %>nok 6 - else block (true)
 
14
  <%end%>
 
15
  <%if    n == 1234 %>nok 7 - if block (false)
 
16
  <%elsif n == 20   %>nok 7 - elsif block (false)
 
17
  <%else            %>ok 7 - else block (false)
 
18
  <% end %>
 
19
  <%for test in [8, 9]  do %>ok #{test} - for loop test
 
20
  <%end%>
 
21
<%#puts "nok 10 - commented out directive" %>
 
22
ok 10 - final template text