|
7 | 7 | "desc": "A lambda's return value should be interpolated.", |
8 | 8 | "data": { |
9 | 9 | "lambda": { |
| 10 | + "__tag__": "code", |
10 | 11 | "ruby": "proc { \"world\" }", |
11 | 12 | "raku": "sub { \"world\" }", |
12 | 13 | "perl": "sub { \"world\" }", |
|
26 | 27 | "data": { |
27 | 28 | "planet": "world", |
28 | 29 | "lambda": { |
| 30 | + "__tag__": "code", |
29 | 31 | "ruby": "proc { \"{{planet}}\" }", |
30 | 32 | "raku": "sub { q+{{planet}}+ }", |
31 | 33 | "perl": "sub { \"{{planet}}\" }", |
|
45 | 47 | "data": { |
46 | 48 | "planet": "world", |
47 | 49 | "lambda": { |
| 50 | + "__tag__": "code", |
48 | 51 | "ruby": "proc { \"|planet| => {{planet}}\" }", |
49 | 52 | "raku": "sub { q+|planet| => {{planet}}+ }", |
50 | 53 | "perl": "sub { \"|planet| => {{planet}}\" }", |
|
63 | 66 | "desc": "Interpolated lambdas should not be cached.", |
64 | 67 | "data": { |
65 | 68 | "lambda": { |
| 69 | + "__tag__": "code", |
66 | 70 | "ruby": "proc { $calls ||= 0; $calls += 1 }", |
67 | 71 | "raku": "sub { state $calls += 1 }", |
68 | 72 | "perl": "sub { no strict; $calls += 1 }", |
|
81 | 85 | "desc": "Lambda results should be appropriately escaped.", |
82 | 86 | "data": { |
83 | 87 | "lambda": { |
| 88 | + "__tag__": "code", |
84 | 89 | "ruby": "proc { \">\" }", |
85 | 90 | "raku": "sub { \">\" }", |
86 | 91 | "perl": "sub { \">\" }", |
|
100 | 105 | "data": { |
101 | 106 | "x": "Error!", |
102 | 107 | "lambda": { |
| 108 | + "__tag__": "code", |
103 | 109 | "ruby": "proc { |text| text == \"{{x}}\" ? \"yes\" : \"no\" }", |
104 | 110 | "raku": "sub { $^section eq q+{{x}}+ ?? \"yes\" !! \"no\" }", |
105 | 111 | "perl": "sub { $_[0] eq \"{{x}}\" ? \"yes\" : \"no\" }", |
|
119 | 125 | "data": { |
120 | 126 | "planet": "Earth", |
121 | 127 | "lambda": { |
| 128 | + "__tag__": "code", |
122 | 129 | "ruby": "proc { |text| \"#{text}{{planet}}#{text}\" }", |
123 | 130 | "raku": "sub { $^section ~ q+{{planet}}+ ~ $^section }", |
124 | 131 | "perl": "sub { $_[0] . \"{{planet}}\" . $_[0] }", |
|
138 | 145 | "data": { |
139 | 146 | "planet": "Earth", |
140 | 147 | "lambda": { |
| 148 | + "__tag__": "code", |
141 | 149 | "ruby": "proc { |text| \"#{text}{{planet}} => |planet|#{text}\" }", |
142 | 150 | "raku": "sub { $^section ~ q+{{planet}} => |planet|+ ~ $^section }", |
143 | 151 | "perl": "sub { $_[0] . \"{{planet}} => |planet|\" . $_[0] }", |
|
156 | 164 | "desc": "Lambdas used for sections should not be cached.", |
157 | 165 | "data": { |
158 | 166 | "lambda": { |
| 167 | + "__tag__": "code", |
159 | 168 | "ruby": "proc { |text| \"__#{text}__\" }", |
160 | 169 | "raku": "sub { \"__\" ~ $^section ~ \"__\" }", |
161 | 170 | "perl": "sub { \"__\" . $_[0] . \"__\" }", |
|
175 | 184 | "data": { |
176 | 185 | "static": "static", |
177 | 186 | "lambda": { |
| 187 | + "__tag__": "code", |
178 | 188 | "ruby": "proc { |text| false }", |
179 | 189 | "raku": "sub { 0 }", |
180 | 190 | "perl": "sub { 0 }", |
|
0 commit comments