html-template-pro 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. data/.autotest +9 -0
  2. data/ARTISTIC +131 -0
  3. data/History.txt +4 -0
  4. data/LGPL +504 -0
  5. data/Manifest.txt +221 -0
  6. data/README.rdoc +52 -0
  7. data/Rakefile +18 -0
  8. data/benchmark.rb +136 -0
  9. data/config/website.yml +2 -0
  10. data/ext/html/template/internal/Pro.xs +679 -0
  11. data/ext/html/template/internal/builtin_findfile.inc +361 -0
  12. data/ext/html/template/internal/calc.h +26 -0
  13. data/ext/html/template/internal/calc.inc +120 -0
  14. data/ext/html/template/internal/callback_stubs.inc +63 -0
  15. data/ext/html/template/internal/expr.c +2267 -0
  16. data/ext/html/template/internal/expr.y +476 -0
  17. data/ext/html/template/internal/expr_iface.c +94 -0
  18. data/ext/html/template/internal/exprpstr.h +36 -0
  19. data/ext/html/template/internal/exprpstr.inc +144 -0
  20. data/ext/html/template/internal/exprtool.h +99 -0
  21. data/ext/html/template/internal/exprtool.inc +289 -0
  22. data/ext/html/template/internal/exprtype.h +62 -0
  23. data/ext/html/template/internal/exprval.h +30 -0
  24. data/ext/html/template/internal/extconf.rb +6 -0
  25. data/ext/html/template/internal/internal.c +449 -0
  26. data/ext/html/template/internal/loadfile.h +11 -0
  27. data/ext/html/template/internal/loadfile.inc +171 -0
  28. data/ext/html/template/internal/pabidecl.h +54 -0
  29. data/ext/html/template/internal/pabstract.h +426 -0
  30. data/ext/html/template/internal/parse_expr.h +15 -0
  31. data/ext/html/template/internal/pbuffer.c +76 -0
  32. data/ext/html/template/internal/pbuffer.h +31 -0
  33. data/ext/html/template/internal/pmiscdef.h +54 -0
  34. data/ext/html/template/internal/pparam.h +101 -0
  35. data/ext/html/template/internal/ppport.h +1098 -0
  36. data/ext/html/template/internal/procore.c +1189 -0
  37. data/ext/html/template/internal/procore.h +18 -0
  38. data/ext/html/template/internal/proparam.c +443 -0
  39. data/ext/html/template/internal/proparam.h +571 -0
  40. data/ext/html/template/internal/proscope.h +32 -0
  41. data/ext/html/template/internal/proscope.inc +107 -0
  42. data/ext/html/template/internal/prostate.h +49 -0
  43. data/ext/html/template/internal/prostate.inc +24 -0
  44. data/ext/html/template/internal/provalue.h +14 -0
  45. data/ext/html/template/internal/pstring.h +60 -0
  46. data/ext/html/template/internal/pstrutils.h +25 -0
  47. data/ext/html/template/internal/pstrutils.inc +150 -0
  48. data/ext/html/template/internal/tagstack.h +30 -0
  49. data/ext/html/template/internal/tagstack.inc +65 -0
  50. data/ext/html/template/internal/tmpllog.c +62 -0
  51. data/ext/html/template/internal/tmpllog.h +27 -0
  52. data/ext/html/template/internal/tmplpro.h +218 -0
  53. data/ext/html/template/internal/tmplpro_version.c +35 -0
  54. data/lib/html/template/pro.rb +225 -0
  55. data/script/console +10 -0
  56. data/script/destroy +14 -0
  57. data/script/generate +14 -0
  58. data/script/txt2html +71 -0
  59. data/tasks/extconf.rake +13 -0
  60. data/tasks/extconf/tmplpro.rake +43 -0
  61. data/templates-Pro/a.incl +1 -0
  62. data/templates-Pro/empty.incl +0 -0
  63. data/templates-Pro/include/1/a.incl +1 -0
  64. data/templates-Pro/include/2.out +3 -0
  65. data/templates-Pro/include/2.tmpl +1 -0
  66. data/templates-Pro/include/2/a.incl +1 -0
  67. data/templates-Pro/include/3.tmpl +1 -0
  68. data/templates-Pro/include/4.tmpl +1 -0
  69. data/templates-Pro/include/a.incl +1 -0
  70. data/templates-Pro/test_broken.tmpl +25 -0
  71. data/templates-Pro/test_broken1.out +1 -0
  72. data/templates-Pro/test_broken1.tmpl +1 -0
  73. data/templates-Pro/test_esc1.out +4 -0
  74. data/templates-Pro/test_esc1.tmpl +4 -0
  75. data/templates-Pro/test_esc2.out +5 -0
  76. data/templates-Pro/test_esc2.tmpl +6 -0
  77. data/templates-Pro/test_esc3.out +4 -0
  78. data/templates-Pro/test_esc3.tmpl +4 -0
  79. data/templates-Pro/test_esc4.out +3 -0
  80. data/templates-Pro/test_esc4.tmpl +4 -0
  81. data/templates-Pro/test_expr1.out +26 -0
  82. data/templates-Pro/test_expr1.tmpl +26 -0
  83. data/templates-Pro/test_expr2.out +34 -0
  84. data/templates-Pro/test_expr2.tmpl +34 -0
  85. data/templates-Pro/test_expr3.out +6 -0
  86. data/templates-Pro/test_expr3.tmpl +6 -0
  87. data/templates-Pro/test_expr4.out +4 -0
  88. data/templates-Pro/test_expr4.tmpl +4 -0
  89. data/templates-Pro/test_expr5.out +18 -0
  90. data/templates-Pro/test_expr5.tmpl +18 -0
  91. data/templates-Pro/test_expr6.out +18 -0
  92. data/templates-Pro/test_expr6.tmpl +18 -0
  93. data/templates-Pro/test_expr7.out +44 -0
  94. data/templates-Pro/test_expr7.tmpl +20 -0
  95. data/templates-Pro/test_expr8.out +15 -0
  96. data/templates-Pro/test_expr8.tmpl +15 -0
  97. data/templates-Pro/test_if1.out +25 -0
  98. data/templates-Pro/test_if1.tmpl +28 -0
  99. data/templates-Pro/test_if2.out +17 -0
  100. data/templates-Pro/test_if2.tmpl +25 -0
  101. data/templates-Pro/test_if3.out +12 -0
  102. data/templates-Pro/test_if3.tmpl +14 -0
  103. data/templates-Pro/test_if4.out +15 -0
  104. data/templates-Pro/test_if4.tmpl +31 -0
  105. data/templates-Pro/test_if5.out +16 -0
  106. data/templates-Pro/test_if5.tmpl +16 -0
  107. data/templates-Pro/test_if6.out +15 -0
  108. data/templates-Pro/test_if6.tmpl +31 -0
  109. data/templates-Pro/test_if7.out +14 -0
  110. data/templates-Pro/test_if7.tmpl +18 -0
  111. data/templates-Pro/test_include1.out +23 -0
  112. data/templates-Pro/test_include1.tmpl +7 -0
  113. data/templates-Pro/test_include2.out +120 -0
  114. data/templates-Pro/test_include2.tmpl +10 -0
  115. data/templates-Pro/test_include3.out +8 -0
  116. data/templates-Pro/test_include3.tmpl +8 -0
  117. data/templates-Pro/test_include4.out +7 -0
  118. data/templates-Pro/test_include4.tmpl +6 -0
  119. data/templates-Pro/test_include5.out +7 -0
  120. data/templates-Pro/test_include5.tmpl +6 -0
  121. data/templates-Pro/test_loop1.erb +17 -0
  122. data/templates-Pro/test_loop1.out +12 -0
  123. data/templates-Pro/test_loop1.tmpl +16 -0
  124. data/templates-Pro/test_loop2.erb +19 -0
  125. data/templates-Pro/test_loop2.out +40 -0
  126. data/templates-Pro/test_loop2.tmpl +19 -0
  127. data/templates-Pro/test_loop3.out +38 -0
  128. data/templates-Pro/test_loop3.tmpl +40 -0
  129. data/templates-Pro/test_loop4.out +44 -0
  130. data/templates-Pro/test_loop4.tmpl +20 -0
  131. data/templates-Pro/test_loop5.out +9 -0
  132. data/templates-Pro/test_loop5.tmpl +11 -0
  133. data/templates-Pro/test_loop6.out +33 -0
  134. data/templates-Pro/test_loop6.tmpl +15 -0
  135. data/templates-Pro/test_malloc.tmpl +1 -0
  136. data/templates-Pro/test_userfunc1.out +14 -0
  137. data/templates-Pro/test_userfunc1.tmpl +14 -0
  138. data/templates-Pro/test_userfunc2.out +35 -0
  139. data/templates-Pro/test_userfunc2.tmpl +5 -0
  140. data/templates-Pro/test_userfunc3.out +5 -0
  141. data/templates-Pro/test_userfunc3.tmpl +5 -0
  142. data/templates-Pro/test_userfunc4.out +10 -0
  143. data/templates-Pro/test_userfunc4.tmpl +10 -0
  144. data/templates-Pro/test_userfunc5.out +4 -0
  145. data/templates-Pro/test_userfunc5.tmpl +4 -0
  146. data/templates-Pro/test_userfunc6.out +4 -0
  147. data/templates-Pro/test_userfunc6.tmpl +4 -0
  148. data/templates-Pro/test_var1.erb +23 -0
  149. data/templates-Pro/test_var1.out +20 -0
  150. data/templates-Pro/test_var1.tmpl +23 -0
  151. data/templates-Pro/test_var2.erb +7 -0
  152. data/templates-Pro/test_var2.out +6 -0
  153. data/templates-Pro/test_var2.tmpl +7 -0
  154. data/templates-Pro/test_var3.out +14 -0
  155. data/templates-Pro/test_var3.tmpl +16 -0
  156. data/templates/case_loop.tmpl +3 -0
  157. data/templates/context.tmpl +3 -0
  158. data/templates/counter.tmpl +2 -0
  159. data/templates/default.tmpl +1 -0
  160. data/templates/default_escape.tmpl +4 -0
  161. data/templates/double_loop.tmpl +7 -0
  162. data/templates/escape.tmpl +5 -0
  163. data/templates/global-loops.tmpl +9 -0
  164. data/templates/globals.tmpl +11 -0
  165. data/templates/if.tmpl +7 -0
  166. data/templates/ifelse.tmpl +6 -0
  167. data/templates/include.tmpl +14 -0
  168. data/templates/include_path/a.tmpl +2 -0
  169. data/templates/include_path/b.tmpl +1 -0
  170. data/templates/include_path/inner.tmpl +1 -0
  171. data/templates/include_path/one.tmpl +2 -0
  172. data/templates/include_path2/inner.tmpl +1 -0
  173. data/templates/included.tmpl +4 -0
  174. data/templates/included2.tmpl +3 -0
  175. data/templates/js.tmpl +1 -0
  176. data/templates/long_loops.tmpl +307 -0
  177. data/templates/loop-context.tmpl +2 -0
  178. data/templates/loop-if.tmpl +9 -0
  179. data/templates/medium.tmpl +217 -0
  180. data/templates/multiline_tags.tmpl +7 -0
  181. data/templates/newline_test1.tmpl +1 -0
  182. data/templates/newline_test2.tmpl +1 -0
  183. data/templates/other-loop.tmpl +7 -0
  184. data/templates/outer.tmpl +3 -0
  185. data/templates/query-test.tmpl +21 -0
  186. data/templates/query-test2.tmpl +12 -0
  187. data/templates/recursive.tmpl +2 -0
  188. data/templates/searchpath/included.tmpl +4 -0
  189. data/templates/searchpath/three.tmpl +1 -0
  190. data/templates/searchpath/two.tmpl +2 -0
  191. data/templates/simple-loop-nonames.tmpl +13 -0
  192. data/templates/simple-loop.tmpl +12 -0
  193. data/templates/simple.tmpl +9 -0
  194. data/templates/unless.tmpl +5 -0
  195. data/templates/urlescape.tmpl +3 -0
  196. data/templates/vanguard1.tmpl +2 -0
  197. data/templates/vanguard2.tmpl +3 -0
  198. data/test/templates/complex.tmpl +24 -0
  199. data/test/templates/foo.tmpl +6 -0
  200. data/test/templates/func.tmpl +2 -0
  201. data/test/templates/loop.tmpl +14 -0
  202. data/test/templates/negative.tmpl +1 -0
  203. data/test/templates/numerics.tmpl +6 -0
  204. data/test/templates/register.tmpl +2 -0
  205. data/test/test_basic.rb +23 -0
  206. data/test/test_coderefs.rb +16 -0
  207. data/test/test_complex.rb +106 -0
  208. data/test/test_helper.rb +3 -0
  209. data/test/test_html_template.rb +583 -0
  210. data/test/test_html_template_internal_extn.rb +10 -0
  211. data/test/test_html_template_pro.rb +177 -0
  212. data/test/test_path_like_variable_scope.rb +59 -0
  213. data/test/test_random.rb +21 -0
  214. data/test/test_realloc.rb +16 -0
  215. data/test/test_register.rb +25 -0
  216. data/test/test_tmplpro.rb +9 -0
  217. data/test/tests.rb +9 -0
  218. data/website/index.txt +57 -0
  219. data/website/javascripts/rounded_corners_lite.inc.js +285 -0
  220. data/website/stylesheets/screen.css +159 -0
  221. data/website/template.html.erb +50 -0
  222. metadata +303 -0
@@ -0,0 +1,23 @@
1
+ <HTML><BODY>
2
+ <H1> test_include1 </H1>
3
+ undefined (TRUE), so including test_if2 ...
4
+ <HTML><BODY>
5
+ <H1> test_if2 </H1>
6
+ undefined (TRUE)
7
+ (if test 1)
8
+
9
+ VAR2 defined (TRUE)
10
+ (if test 2)
11
+
12
+ defined (if test 3 level 1) VISIBLE
13
+ VAR2 VISIBLE (if test 3 level 2)
14
+ VAR2 defined VISIBLE (if test 3 level 3)
15
+ --- visible ---
16
+
17
+
18
+
19
+ <H1> END test_if2 </H1>
20
+ </body></html>
21
+
22
+ (include test 1)
23
+ </body></html>
@@ -0,0 +1,7 @@
1
+ <HTML><BODY>
2
+ <H1> test_include1 </H1>
3
+ <tmpl_iF VAR4> <tmpl_include NAME="test_var1.tmpl"> <tmpl_var naMe="VAR4"> defined (FALSE)
4
+ <tmpl_else> <tmpl_var naMe="VAR4"> undefined (TRUE), so including test_if2 ...
5
+ <tmpl_include NAME="test_if2.tmpl">
6
+ </tmpl_if> (include test 1)
7
+ </body></html>
@@ -0,0 +1,120 @@
1
+ <HTML><BODY>
2
+ <H1> test_include2 </H1>
3
+
4
+ Before recursive include
5
+
6
+ <HTML><BODY>
7
+ <H1> test_include2 </H1>
8
+
9
+ Before recursive include
10
+
11
+ <HTML><BODY>
12
+ <H1> test_include2 </H1>
13
+
14
+ Before recursive include
15
+
16
+ <HTML><BODY>
17
+ <H1> test_include2 </H1>
18
+
19
+ Before recursive include
20
+
21
+ <HTML><BODY>
22
+ <H1> test_include2 </H1>
23
+
24
+ Before recursive include
25
+
26
+ <HTML><BODY>
27
+ <H1> test_include2 </H1>
28
+
29
+ Before recursive include
30
+
31
+ <HTML><BODY>
32
+ <H1> test_include2 </H1>
33
+
34
+ Before recursive include
35
+
36
+ <HTML><BODY>
37
+ <H1> test_include2 </H1>
38
+
39
+ Before recursive include
40
+
41
+ <HTML><BODY>
42
+ <H1> test_include2 </H1>
43
+
44
+ Before recursive include
45
+
46
+ <HTML><BODY>
47
+ <H1> test_include2 </H1>
48
+
49
+ Before recursive include
50
+
51
+ <HTML><BODY>
52
+ <H1> test_include2 </H1>
53
+
54
+ Before recursive include
55
+
56
+ <HTML><BODY>
57
+ <H1> test_include2 </H1>
58
+
59
+ Before recursive include
60
+
61
+
62
+
63
+ After recursive include
64
+
65
+ </body></html>
66
+
67
+
68
+ After recursive include
69
+
70
+ </body></html>
71
+
72
+
73
+ After recursive include
74
+
75
+ </body></html>
76
+
77
+
78
+ After recursive include
79
+
80
+ </body></html>
81
+
82
+
83
+ After recursive include
84
+
85
+ </body></html>
86
+
87
+
88
+ After recursive include
89
+
90
+ </body></html>
91
+
92
+
93
+ After recursive include
94
+
95
+ </body></html>
96
+
97
+
98
+ After recursive include
99
+
100
+ </body></html>
101
+
102
+
103
+ After recursive include
104
+
105
+ </body></html>
106
+
107
+
108
+ After recursive include
109
+
110
+ </body></html>
111
+
112
+
113
+ After recursive include
114
+
115
+ </body></html>
116
+
117
+
118
+ After recursive include
119
+
120
+ </body></html>
@@ -0,0 +1,10 @@
1
+ <HTML><BODY>
2
+ <H1> test_include2 </H1>
3
+
4
+ Before recursive include
5
+
6
+ <tmpl_include NAME="test_include2.tmpl">
7
+
8
+ After recursive include
9
+
10
+ </body></html>
@@ -0,0 +1,8 @@
1
+ <HTML><BODY>
2
+ <H1> test_include3 </H1>
3
+
4
+ including empty template
5
+
6
+ After including empty template
7
+
8
+ </body></html>
@@ -0,0 +1,8 @@
1
+ <HTML><BODY>
2
+ <H1> test_include3 </H1>
3
+
4
+ including empty template
5
+ <tmpl_include NAME="empty.incl">
6
+ After including empty template
7
+
8
+ </body></html>
@@ -0,0 +1,7 @@
1
+ <HTML><BODY>
2
+ <H1> test_include path with default options </H1>
3
+
4
+ A-ROOT
5
+
6
+
7
+ </body></html>
@@ -0,0 +1,6 @@
1
+ <HTML><BODY>
2
+ <H1> test_include path with default options </H1>
3
+
4
+ <tmpl_include NAME="a.incl">
5
+
6
+ </body></html>
@@ -0,0 +1,7 @@
1
+ <HTML><BODY>
2
+ <H1> test_include: path with search_path_on_include </H1>
3
+
4
+ A-1
5
+
6
+
7
+ </body></html>
@@ -0,0 +1,6 @@
1
+ <HTML><BODY>
2
+ <H1> test_include: path with search_path_on_include </H1>
3
+
4
+ <tmpl_include NAME="a.incl">
5
+
6
+ </body></html>
@@ -0,0 +1,17 @@
1
+ <HTML>
2
+ <body>
3
+ <H1> test_loop1 </H1>
4
+
5
+ We test empty and undefined loops
6
+
7
+ <% params[:HASHREF0] && params[:HASHREF0].each do |param| %>
8
+ test failed <%= param[:VAR1] %> test failed
9
+ <% end %>
10
+
11
+ <% params[:FAKENAME] && params[:FAKENAME].each do |param| %>
12
+ test failed <%= param[:VAR1] %> test failed
13
+ <% end %>
14
+
15
+
16
+ </body>
17
+ </HTML>
@@ -0,0 +1,12 @@
1
+ <HTML>
2
+ <body>
3
+ <H1> test_loop1 </H1>
4
+
5
+ We test empty and undefined loops
6
+
7
+
8
+
9
+
10
+
11
+ </body>
12
+ </HTML>
@@ -0,0 +1,16 @@
1
+ <HTML>
2
+ <body>
3
+ <H1> test_loop1 </H1>
4
+
5
+ We test empty and undefined loops
6
+
7
+ <TMPL_LOOP NAME=HASHREF0>
8
+ test failed <tmpl_var NAME="VAR1"> test failed
9
+ </tmpl_loop>
10
+
11
+ <TMPL_LOOP name="FAKENAME">
12
+ test failed <tmpl_var NAME="VAR1"> test failed
13
+ </tmpl_loop>
14
+
15
+ </body>
16
+ </HTML>
@@ -0,0 +1,19 @@
1
+ <HTML>
2
+ <body>
3
+ <H1> test_loop2 </H1>
4
+
5
+ We test simple loop
6
+
7
+ <table>
8
+ <% params[:HASHREF1].each do |param| %>
9
+ <tr>
10
+ <td><%= param[:LOOPVAR1] %></td>
11
+ <td><%= param[:LOOPVAR2] %></td>
12
+ <td><%= param[:LOOPVAR3] %></td>
13
+ <td><%= param[:LOOPVAR0] %></td>
14
+ </tr>
15
+ <% end %>
16
+ </table>
17
+
18
+ </body>
19
+ </HTML>
@@ -0,0 +1,40 @@
1
+ <HTML>
2
+ <body>
3
+ <H1> test_loop2 </H1>
4
+
5
+ We test simple loop
6
+
7
+ <table>
8
+
9
+ <tr>
10
+ <td>LOOP1-VAR1</td>
11
+ <td>LOOP1-VAR2</td>
12
+ <td>LOOP1-VAR3</td>
13
+ <td></td>
14
+ </tr>
15
+
16
+ <tr>
17
+ <td>LOOP2-VAR1</td>
18
+ <td>LOOP2-VAR2</td>
19
+ <td>LOOP2-VAR3</td>
20
+ <td></td>
21
+ </tr>
22
+
23
+ <tr>
24
+ <td>LOOP3-VAR1</td>
25
+ <td>LOOP3-VAR2</td>
26
+ <td>LOOP3-VAR3</td>
27
+ <td></td>
28
+ </tr>
29
+
30
+ <tr>
31
+ <td>LOOP4-VAR1</td>
32
+ <td>LOOP4-VAR2</td>
33
+ <td>LOOP4-VAR3</td>
34
+ <td></td>
35
+ </tr>
36
+
37
+ </table>
38
+
39
+ </body>
40
+ </HTML>
@@ -0,0 +1,19 @@
1
+ <HTML>
2
+ <body>
3
+ <H1> test_loop2 </H1>
4
+
5
+ We test simple loop
6
+
7
+ <table>
8
+ <TMPL_LOOP NAME=HASHREF1>
9
+ <tr>
10
+ <td><tmpl_var NAME="LOOPVAR1"></td>
11
+ <td><tmpl_var NAME="LOOPVAR2"></td>
12
+ <td><tmpl_var NAME="LOOPVAR3"></td>
13
+ <td><tmpl_var NAME="LOOPVAR0"></td>
14
+ </tr>
15
+ </tmpl_loop>
16
+ </table>
17
+
18
+ </body>
19
+ </HTML>
@@ -0,0 +1,38 @@
1
+ <HTML>
2
+ <body>
3
+ <H1> test_loop3 </H1>
4
+
5
+ We test loops and nesting
6
+
7
+ <table>
8
+ <tr>
9
+ <td>LOOP1-VAR1</td>
10
+ <td>LOOP1-VAR2</td>
11
+ <td>LOOP1-VAR3</td>
12
+ <td></td>
13
+ </tr> <tr>
14
+ <td>LOOP2-VAR1</td>
15
+ <td>LOOP2-VAR2</td>
16
+ <td>LOOP2-VAR3</td>
17
+ <td></td>
18
+ </tr> <tr>
19
+ <td>LOOP3-VAR1</td>
20
+ <td>LOOP3-VAR2</td>
21
+ <td>LOOP3-VAR3</td>
22
+ <td></td>
23
+ </tr> <tr>
24
+ <td>LOOP4-VAR1</td>
25
+ <td>LOOP4-VAR2</td>
26
+ <td>LOOP4-VAR3</td>
27
+ <td></td>
28
+ </tr>
29
+ </table>
30
+
31
+
32
+
33
+ VAR2 test passed
34
+
35
+
36
+
37
+ </body>
38
+ </HTML>
@@ -0,0 +1,40 @@
1
+ <HTML>
2
+ <body>
3
+ <H1> test_loop3 </H1>
4
+
5
+ We test loops and nesting
6
+
7
+ <table>
8
+ <TMPL_LOOP name="HASHREF1"> <tr>
9
+ <td><tmpl_var NAME="LOOPVAR1"></td>
10
+ <td><tmpl_var NAME="LOOPVAR2"></td>
11
+ <td><tmpl_var NAME="LOOPVAR3"></td>
12
+ <td><tmpl_var NAME="LOOPVAR0"></td>
13
+ </tr> <TMPL_LOOP NAME=HASHREF0>
14
+ test failed <tmpl_var NAME="VAR1"> test failed
15
+ </tmpl_loop> <TMPL_LOOP NAME=FAKEHASH>
16
+ test failed <tmpl_var NAME="VAR1"> test failed
17
+ </tmpl_loop> </tmpl_loop>
18
+ </table>
19
+
20
+ <TMPL_LOOP NAME='HASHREF0'>
21
+ test failed <tmpl_var NAME="VAR1"> test failed
22
+ <table>
23
+ <TMPL_LOOP NAME=HASHREF1><tr>
24
+ <td><tmpl_var NAME="LOOPVAR1"></td>
25
+ <td><tmpl_var NAME="LOOPVAR2"></td>
26
+ <td><tmpl_var NAME="LOOPVAR3"></td>
27
+ <td><tmpl_var NAME="LOOPVAR0"></td>
28
+ </tr>
29
+ </tmpl_loop>
30
+ </table>
31
+ </tmpl_loop>
32
+
33
+ <tmpl_if VAR2> <tmpl_var name="VAR2"> test passed </tmpl_if>
34
+
35
+ <TMPL_LOOP name="FAKENAME">
36
+ test failed <tmpl_var NAME="VAR1"> test failed
37
+ </tmpl_loop>
38
+
39
+ </body>
40
+ </HTML>
@@ -0,0 +1,44 @@
1
+ <HTML>
2
+ <body>
3
+ <H1> test_loop4 </H1>
4
+
5
+ We test inner loop variables
6
+
7
+ <table>
8
+
9
+ <tr>
10
+ <td>first:1</td>
11
+ <td>last: 0</td>
12
+ <td>odd:1</td>
13
+ <td>inner:0</td>
14
+ <td>count:1</td>
15
+ </tr>
16
+
17
+ <tr>
18
+ <td>first:0</td>
19
+ <td>last: 0</td>
20
+ <td>odd:0</td>
21
+ <td>inner:1</td>
22
+ <td>count:2</td>
23
+ </tr>
24
+
25
+ <tr>
26
+ <td>first:0</td>
27
+ <td>last: 0</td>
28
+ <td>odd:1</td>
29
+ <td>inner:1</td>
30
+ <td>count:3</td>
31
+ </tr>
32
+
33
+ <tr>
34
+ <td>first:0</td>
35
+ <td>last: 1</td>
36
+ <td>odd:0</td>
37
+ <td>inner:0</td>
38
+ <td>count:4</td>
39
+ </tr>
40
+
41
+ </table>
42
+
43
+ </body>
44
+ </HTML>